summaryrefslogtreecommitdiff
path: root/include/CMakeLists.txt
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-12-09 19:58:41 -0500
committerAdam <Adam@anope.org>2010-12-09 19:58:41 -0500
commit587e5d94218481178343e85a4d7f6239c8b09ddb (patch)
treea532908c0006c3eb6dfd77bafca2ee2d5a6bc7cd /include/CMakeLists.txt
parent35f03811e899f7cef01a1d84f1167bdb43365e13 (diff)
Fixed build on cmake 2.4.x
Diffstat (limited to 'include/CMakeLists.txt')
-rw-r--r--include/CMakeLists.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index e7df5cfad..b12d03598 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -3,15 +3,15 @@ set_source_files_properties(version.cpp PROPERTIES LANGUAGE CXX COMPILE_FLAGS "$
# Generate version executable to modify version.h, setting it's linker flags as well
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 ${Anope_SOURCE_DIR}/src/version.sh ${CMAKE_CURRENT_SOURCE_DIR}/version.h
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/version.cpp ${SRC_SRCS}
+ COMMAND ${version_BINARY} ${Anope_SOURCE_DIR}/src/version.sh ${CMAKE_CURRENT_SOURCE_DIR}/version.h
+ DEPENDS version ${SRC_SRCS}
)
# Add version to list of files for CPack to ignore
-get_target_property(version_BINARY version LOCATION)
get_filename_component(version_BINARY ${version_BINARY} NAME)
add_to_cpack_ignored_files("${version_BINARY}$" TRUE)
# Add a custom target to the above file
-add_custom_target(headers DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/version.h)
+add_custom_target(headers DEPENDS version ${CMAKE_CURRENT_BINARY_DIR}/version.h)