diff options
author | Adam <Adam@anope.org> | 2011-06-02 12:45:08 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-06-02 12:45:08 -0400 |
commit | 184b346166db9d40fcdc7bb6bf3a7929fdd48be9 (patch) | |
tree | eb31d479e510bc7f491712fa67f26d4f1dd6c379 /include/CMakeLists.txt | |
parent | b2c807dc8c30bfd614dc44c68f794b8fc30cc7e6 (diff) |
Place version.h in build/ not include/
Diffstat (limited to 'include/CMakeLists.txt')
-rw-r--r-- | include/CMakeLists.txt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 233e1d3a5..0205fab95 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -4,9 +4,10 @@ set_source_files_properties(version.cpp PROPERTIES LANGUAGE CXX COMPILE_FLAGS "$ add_executable(version version.cpp) set_target_properties(version PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS "${LDFLAGS}") get_target_property(version_BINARY version LOCATION) -# Modify version.h from the above executable, with dependencies to the given headers, version.cpp, and all source files in the main Anope build -add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.h - COMMAND ${version_BINARY} ${Anope_SOURCE_DIR}/src/version.sh ${CMAKE_CURRENT_SOURCE_DIR}/version.h +# Modify version.h from the above executable, with dependencies to version.cpp +# and all of the source files in the main build +add_custom_command(OUTPUT version_build + COMMAND ${version_BINARY} ${Anope_SOURCE_DIR}/src/version.sh ${CMAKE_CURRENT_BINARY_DIR}/version.h DEPENDS version ${SRC_SRCS} ) # Add version to list of files for CPack to ignore @@ -44,4 +45,4 @@ if(CMAKE_COMPILER_IS_GNUCXX) endif(CMAKE_COMPILER_IS_GNUCXX) # Add a custom target to the above file -add_custom_target(headers DEPENDS version ${CMAKE_CURRENT_BINARY_DIR}/version.h ${PCH_SOURCES_GCH}) +add_custom_target(headers DEPENDS version version_build ${PCH_SOURCES_GCH}) |