summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-06-13 15:24:52 +0000
committerCampbell Barton <ideasman42@gmail.com>2011-06-13 15:24:52 +0000
commiteceeca65839d5e61234c235d5a6df0e360707862 (patch)
treeae793b775b4f53b4ca8704d44168e28cfbadc424 /src
parentdisplay angle info in the measurement tool (diff)
downloadinkscape-eceeca65839d5e61234c235d5a6df0e360707862.tar.gz
inkscape-eceeca65839d5e61234c235d5a6df0e360707862.zip
cmake:
The cmake files were using the inkscape-version.cpp file generated by autoconfigure. now generate our own. Also remove bad include. (bzr r10289)
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt31
-rw-r--r--src/helper/CMakeLists.txt1
2 files changed, 29 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3e7fe3a11..7fa4e86e8 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -219,7 +219,6 @@ set(inkscape_SRC
ige-mac-menu.c
ink-action.cpp
ink-comboboxentry-action.cpp
- inkscape-version.cpp
inkscape.cpp
inkscape.rc
interface.cpp
@@ -492,6 +491,33 @@ endif()
# -----------------------------------------------------------------------------
+# Generate version file
+# -----------------------------------------------------------------------------
+
+# a custom target that is always built
+add_custom_target(
+ inkscape_version ALL
+ DEPENDS ${CMAKE_BINARY_DIR}/src/inkscape-version.cpp)
+
+# creates inkscape-version.cpp using cmake script
+add_custom_command(
+ OUTPUT ${CMAKE_BINARY_DIR}/src/inkscape-version.cpp
+ COMMAND ${CMAKE_COMMAND}
+ -DINKSCAPE_SOURCE_DIR=${CMAKE_SOURCE_DIR}
+ -DINKSCAPE_BINARY_DIR=${CMAKE_BINARY_DIR}
+ -P ${CMAKE_SOURCE_DIR}/CMakeScripts/inkscape-version.cmake)
+
+# buildinfo.h is a generated file
+set_source_files_properties(
+ ${CMAKE_BINARY_DIR}/src/inkscape-version.cpp
+ PROPERTIES GENERATED TRUE)
+
+list(APPEND inkscape_SRC
+ ${CMAKE_BINARY_DIR}/src/inkscape-version.cpp
+)
+
+
+# -----------------------------------------------------------------------------
# Load in subdirectories
# -----------------------------------------------------------------------------
@@ -536,7 +562,6 @@ set(inkscape_SRC
${inkscape_SRC}
)
-
# -----------------------------------------------------------------------------
# Setup the executable
# -----------------------------------------------------------------------------
@@ -546,6 +571,8 @@ add_inkscape_lib(inkscape_LIB "${inkscape_SRC}")
# make executable for INKSCAPE
add_executable(inkscape ${main_SRC})
+add_dependencies(inkscape inkscape_version)
+
target_link_libraries(inkscape
# order from automake
sp_LIB
diff --git a/src/helper/CMakeLists.txt b/src/helper/CMakeLists.txt
index f1069e986..8137487e2 100644
--- a/src/helper/CMakeLists.txt
+++ b/src/helper/CMakeLists.txt
@@ -37,7 +37,6 @@ set(helper_SRC
pixbuf-ops.h
png-write.h
recthull.h
- sp-marshal.h
stlport.h
stock-items.h
unit-menu.h