summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuan Luis Boya García <ntrrgc@gmail.com>2015-08-13 02:47:33 +0000
committerJuan Luis Boya García <ntrrgc@gmail.com>2015-08-13 02:47:33 +0000
commit6cdb4d6ac36c9d99f3b5e9b262719b480c97bcf5 (patch)
tree1552af7b162e04b9c2fc0cdff0496da9830a5c71
parentTranslations. Minor fix in the Odia translation (unwanted escape sequence). (diff)
downloadinkscape-6cdb4d6ac36c9d99f3b5e9b262719b480c97bcf5.tar.gz
inkscape-6cdb4d6ac36c9d99f3b5e9b262719b480c97bcf5.zip
Add inkview to the CMake build.
(bzr r14293.1.1)
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/CMakeLists.txt55
2 files changed, 30 insertions, 27 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 87f976207..5b3b00844 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -149,7 +149,7 @@ if(UNIX)
# TODO: man, locale
install(
- PROGRAMS ${EXECUTABLE_OUTPUT_PATH}/inkscape
+ PROGRAMS ${EXECUTABLE_OUTPUT_PATH}/inkscape ${EXECUTABLE_OUTPUT_PATH}/inkview
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c416b0dea..ed93d5f14 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -509,8 +509,14 @@ set(inkscape_SRC
#add_inkscape_lib(sp_LIB "${sp_SRC}")
#add_inkscape_lib(inkscape_LIB "${inkscape_SRC}")
-# make executable for INKSCAPE
-add_executable(inkscape ${main_SRC} ${inkscape_SRC} ${sp_SRC})
+# Build everything except main and inkview.c in a CMake "object" library.
+# An object library is just a bunch of .o files. Linking them with main.c or inkview.c
+# we get the inkscape and inkview executables respectively.
+add_library(inkscape_base OBJECT ${inkscape_SRC} ${sp_SRC})
+
+# make executables for inkscape and inkview
+add_executable(inkscape ${main_SRC} $<TARGET_OBJECTS:inkscape_base>)
+add_executable(inkview inkview.cpp $<TARGET_OBJECTS:inkscape_base>)
if(UNIX)
# message after building.
@@ -523,31 +529,28 @@ endif()
add_dependencies(inkscape inkscape_version)
-target_link_libraries(inkscape
- # order from automake
- #sp_LIB
- #nrtype_LIB
-
- #inkscape_LIB
- #sp_LIB # annoying, we need both!
- nrtype_LIB # annoying, we need both!
+set(INKSCAPE_TARGET_LIBS
+ # order from automake
+ #sp_LIB
+ #nrtype_LIB
- croco_LIB
- avoid_LIB
- gdl_LIB
- cola_LIB
- vpsc_LIB
- livarot_LIB
- uemf_LIB
- 2geom_LIB
- depixelize_LIB
- util_LIB
- gc_LIB
+ #inkscape_LIB
+ #sp_LIB # annoying, we need both!
+ nrtype_LIB # annoying, we need both!
- ${INKSCAPE_LIBS}
+ croco_LIB
+ avoid_LIB
+ gdl_LIB
+ cola_LIB
+ vpsc_LIB
+ livarot_LIB
+ uemf_LIB
+ 2geom_LIB
+ depixelize_LIB
+ util_LIB
+ gc_LIB
+ ${INKSCAPE_LIBS}
)
-# TODO
-# make executable for INKVIEW
-#add_executable(inkview inkview.cpp)
-# ...
+target_link_libraries(inkscape ${INKSCAPE_TARGET_LIBS})
+target_link_libraries(inkview ${INKSCAPE_TARGET_LIBS})