summaryrefslogtreecommitdiff
path: root/include/CMakeLists.txt
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-12-29 22:04:53 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-12-29 22:04:53 +0000
commit7d9865150a2770161ea16f734f991d40696f8049 (patch)
tree696c6175fc05eee588cee788ba2c98be7b4997a8 /include/CMakeLists.txt
parent47fb48706c65ff72dfb1dcdda2bfa0301086e918 (diff)
Edits to CPack-related part of CMake to not include Autotools-built files from a dirty source tree.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1884 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include/CMakeLists.txt')
-rw-r--r--include/CMakeLists.txt16
1 files changed, 6 insertions, 10 deletions
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index 6401d2fdc..19bbcfc6c 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -10,12 +10,10 @@ if(MSVC OR NOT SH)
COMMAND version_sh ${Anope_SOURCE_DIR}/version.log ${CMAKE_CURRENT_SOURCE_DIR}/version.sh ${CMAKE_CURRENT_BINARY_DIR}/version.h
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/version.sh DEPENDS version_sh ${CMAKE_CURRENT_SOURCE_DIR}/services.h ${CMAKE_CURRENT_SOURCE_DIR}/pseudo.h ${CMAKE_CURRENT_SOURCE_DIR}/messages.h ${SRC_SRCS}
)
- if(IN_SOURCE)
- # Add version_sh to list of files for CPack to ignore
- get_target_property(version_sh_BINARY version_sh LOCATION)
- get_filename_component(version_sh_BINARY ${version_sh_BINARY} NAME)
- add_to_cpack_ignored_files("${version_sh_BINARY}$" TRUE)
- endif(IN_SOURCE)
+ # Add version_sh to list of files for CPack to ignore
+ get_target_property(version_sh_BINARY version_sh LOCATION)
+ get_filename_component(version_sh_BINARY ${version_sh_BINARY} NAME)
+ add_to_cpack_ignored_files("${version_sh_BINARY}$" TRUE)
# For any non-Visual Studio platforms that do have sh, we will run version.h through the version.h shell script
else(MSVC OR NOT SH)
# Generate version.h from version.sh and the version.log file from the main source directory, with dependencies to the given headers and all source files in the main Anope build
@@ -25,10 +23,8 @@ else(MSVC OR NOT SH)
)
endif(MSVC OR NOT SH)
-if(IN_SOURCE)
- # Add version.h to the list of files for CPack to ignore
- add_to_cpack_ignored_files("version.h$" TRUE)
-endif(IN_SOURCE)
+# Add version.h to the list of files for CPack to ignore
+add_to_cpack_ignored_files("version.h$" TRUE)
# Add a custom target to the above file
add_custom_target(headers DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/version.h)