From eceeca65839d5e61234c235d5a6df0e360707862 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 13 Jun 2011 15:24:52 +0000 Subject: cmake: The cmake files were using the inkscape-version.cpp file generated by autoconfigure. now generate our own. Also remove bad include. (bzr r10289) --- src/CMakeLists.txt | 31 +++++++++++++++++++++++++++++-- src/helper/CMakeLists.txt | 1 - 2 files changed, 29 insertions(+), 3 deletions(-) (limited to 'src') 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 @@ -491,6 +490,33 @@ if(WIN32) 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 -- cgit v1.2.3