summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-06-13 06:38:36 +0000
committerCampbell Barton <ideasman42@gmail.com>2011-06-13 06:38:36 +0000
commitc049136141351920600d1bbd1f330a46a04b1210 (patch)
treefa520c216d04a01639de902766a7ff2e2d581e70
parentcmake: (diff)
downloadinkscape-c049136141351920600d1bbd1f330a46a04b1210.tar.gz
inkscape-c049136141351920600d1bbd1f330a46a04b1210.zip
cmake: basic install target
(bzr r10282)
-rw-r--r--CMakeLists.txt16
-rw-r--r--src/CMakeLists.txt47
2 files changed, 53 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c9dd3f126..073248f78 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,4 @@
-include(CMakeScripts/HelperMacros.cmake) # Misc Utility Macros
-
project(inkscape)
set(INKSCAPE_VERSION 0.48+devel)
@@ -19,10 +17,6 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMakeScripts")
# XXX, TODO: use pkgconfig, This part is WIP to get building
# - campbell
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -fPIC -funsigned-char -fno-strict-aliasing -pthread")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -fPIC -funsigned-char -fno-strict-aliasing -pthread")
-
-
include_directories(
/usr/include/atk-1.0
/usr/include/atkmm-1.6
@@ -67,8 +61,10 @@ add_definitions(-DHAVE_CAIRO_PDF=1) # needed for src/libnrtype/Layout-TNG.h
add_definitions(-DHAVE_TR1_UNORDERED_SET) # XXX make an option!
# XXX - end hackish defines!
+
include(ConfigPaths) # Installation Paths
include(DefineDependsandFlags) # Includes, Compiler Flags, and Link Libraries
+include(HelperMacros) # Misc Utility Macros
option(ENABLE_PROFILING "Turn on profiling" OFF) # Set to true if compiler/linker should enable profiling
@@ -80,12 +76,12 @@ add_custom_target(dist svn export --force -q "${CMAKE_SOURCE_DIR}" "${CMAKE_BINA
# make unistall target
configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
add_custom_target(uninstall
- "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
+ "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
add_subdirectory(src)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 718c92b4b..3e7fe3a11 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -582,3 +582,50 @@ target_link_libraries(inkscape
#add_executable(inkview inkview.cpp)
# ...
+
+# -----------------------------------------------------------------------------
+# Installation
+# -----------------------------------------------------------------------------
+
+if(UNIX)
+ # TODO: man, locale, icons
+
+ # message after building.
+ add_custom_command(
+ TARGET blender POST_BUILD MAIN_DEPENDENCY blender
+ COMMAND ${CMAKE_COMMAND} -E echo 'now run: \"make install\" to copy runtime files & scripts to ${CMAKE_INSTALL_PREFIX}'
+ )
+
+ install(
+ PROGRAMS inkscape
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
+ )
+
+ install(
+ FILES ${CMAKE_SOURCE_DIR}/inkscape.desktop
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications
+ )
+
+ install(
+ DIRECTORY
+ ${CMAKE_SOURCE_DIR}/share/clipart
+ ${CMAKE_SOURCE_DIR}/share/examples
+ ${CMAKE_SOURCE_DIR}/share/extensions
+ ${CMAKE_SOURCE_DIR}/share/filters
+ ${CMAKE_SOURCE_DIR}/share/fonts
+ ${CMAKE_SOURCE_DIR}/share/gradients
+ ${CMAKE_SOURCE_DIR}/share/icons
+ ${CMAKE_SOURCE_DIR}/share/keys
+ ${CMAKE_SOURCE_DIR}/share/markers
+ ${CMAKE_SOURCE_DIR}/share/palettes
+ ${CMAKE_SOURCE_DIR}/share/patterns
+ ${CMAKE_SOURCE_DIR}/share/screens
+ ${CMAKE_SOURCE_DIR}/share/templates
+ ${CMAKE_SOURCE_DIR}/share/tutorials
+ ${CMAKE_SOURCE_DIR}/share/ui
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/inkscape
+ )
+
+else()
+ # TODO, WIN32/APPLE
+endif()