diff options
| author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-12-29 22:04:53 +0000 |
|---|---|---|
| committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-12-29 22:04:53 +0000 |
| commit | 7d9865150a2770161ea16f734f991d40696f8049 (patch) | |
| tree | 696c6175fc05eee588cee788ba2c98be7b4997a8 /lang | |
| parent | 47fb48706c65ff72dfb1dcdda2bfa0301086e918 (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 'lang')
| -rw-r--r-- | lang/CMakeLists.txt | 38 |
1 files changed, 14 insertions, 24 deletions
diff --git a/lang/CMakeLists.txt b/lang/CMakeLists.txt index 7d19d9bdf..5390e6904 100644 --- a/lang/CMakeLists.txt +++ b/lang/CMakeLists.txt @@ -5,11 +5,9 @@ add_executable(langcomp langcomp.c) set_target_properties(langcomp PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS "${LDFLAGS}") # Get the location of the binary to use later get_target_property(langcomp_BINARY langcomp LOCATION) -if(IN_SOURCE) - # Add the executable to the list of files for CPack to ignore - file(RELATIVE_PATH langcomp_BINARY_RELATIVE ${Anope_BINARY_DIR} ${langcomp_BINARY}) - add_to_cpack_ignored_files("${langcomp_BINARY_RELATIVE}$" TRUE) -endif(IN_SOURCE) +# Add the executable to the list of files for CPack to ignore +file(RELATIVE_PATH langcomp_BINARY_RELATIVE ${Anope_BINARY_DIR} ${langcomp_BINARY}) +add_to_cpack_ignored_files("${langcomp_BINARY_RELATIVE}$" TRUE) # Determine if langtool should be built if(MSVC) @@ -31,11 +29,9 @@ if(BUILD_LANGTOOL) set_target_properties(langtool PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS "${LDFLAGS}") # Get the location of the binary to use later) get_target_property(langtool_BINARY langtool LOCATION) - if(IN_SOURCE) - # Add the executable to the list of files for CPack to ignore - file(RELATIVE_PATH langtool_BINARY_RELATIVE ${Anope_BINARY_DIR} ${langtool_BINARY}) - add_to_cpack_ignored_files("${langtool_BINARY_RELATIVE}$" TRUE) - endif(IN_SOURCE) + # Add the executable to the list of files for CPack to ignore + file(RELATIVE_PATH langtool_BINARY_RELATIVE ${Anope_BINARY_DIR} ${langtool_BINARY}) + add_to_cpack_ignored_files("${langtool_BINARY_RELATIVE}$" TRUE) endif(BUILD_LANGTOOL) # If grep exists (and we aren't using Visual Studio, it hates this), use it to generate the index file @@ -51,11 +47,9 @@ else(NOT MSVC AND GREP) MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/en_us.l DEPENDS langtool ) endif(NOT MSVC AND GREP) -if(IN_SOURCE) - # Add the index file to the list of files for CPack to ignore - file(RELATIVE_PATH index_RELATIVE ${Anope_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/index) - add_to_cpack_ignored_files("${index_RELATIVE}$") -endif(IN_SOURCE) +# Add the index file to the list of files for CPack to ignore +file(RELATIVE_PATH index_RELATIVE ${Anope_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/index) +add_to_cpack_ignored_files("${index_RELATIVE}$") # Find all the *.l files within the current source directory, and sort the list file(GLOB LANG_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.l") @@ -74,11 +68,9 @@ foreach(LANG_L ${LANG_SRCS}) COMMAND ${langcomp_BINARY} ${CMAKE_CURRENT_SOURCE_DIR}/${LANG_L} ${CMAKE_CURRENT_BINARY_DIR}/${LANG} MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/${LANG_L} DEPENDS langcomp ${CMAKE_CURRENT_BINARY_DIR}/index ) - if(IN_SOURCE) - # Add the language file to the list of files for CPack to ignore - file(RELATIVE_PATH LANG_RELATIVE ${Anope_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/${LANG}) - add_to_cpack_ignored_files("${LANG_RELATIVE}$") - endif(IN_SOURCE) + # Add the language file to the list of files for CPack to ignore + file(RELATIVE_PATH LANG_RELATIVE ${Anope_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/${LANG}) + add_to_cpack_ignored_files("${LANG_RELATIVE}$") endforeach(LANG_L) # If perl exists (and we aren't using Visual Studio, it hates this), use it to generate language.h @@ -94,10 +86,8 @@ else(NOT MSVC AND PERL) MAIN_DEPENDENCY ${CMAKE_CURRENT_BINARY_DIR}/index DEPENDS langtool ) endif(NOT MSVC AND PERL) -if(IN_SOURCE) - # Add language.h to the list of files for CPack to ignore - add_to_cpack_ignored_files("language.h$" TRUE) -endif(IN_SOURCE) +# Add language.h to the list of files for CPack to ignore +add_to_cpack_ignored_files("language.h$" TRUE) # Add a custom target to depend on the language files and language.h add_custom_target(language DEPENDS ${LANGS} ${CMAKE_CURRENT_BINARY_DIR}/language.h) |
