From 75b4bc020f5e08a458753423841118e5c962e18c Mon Sep 17 00:00:00 2001 From: cyberbotx Date: Fri, 19 Dec 2008 20:09:37 +0000 Subject: Some more CMake fixes for 2.4.x (Apparently 2.4.x before 2.4.8 didn't have a FIND sub-command for the list() function) As a side-note, I'd also recommend trying (it's not required) to get CMake 2.6.x to use with Anope, the workarounds to get 2.6.x's functionality with 2.4.x are slow. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1849 5417fbe8-f217-4b02-8779-1006273d7864 --- lang/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lang') diff --git a/lang/CMakeLists.txt b/lang/CMakeLists.txt index d38320d93..1de7bfca8 100644 --- a/lang/CMakeLists.txt +++ b/lang/CMakeLists.txt @@ -13,19 +13,19 @@ if(NOT GREP OR NOT PERL) set_target_properties(langtool PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS "${LDFLAGS}") endif(NOT GREP OR NOT PERL) -# If grep exists, use it to generate the index file -if(GREP) +# If grep exists (and we aren't using Visual Studio, it hates this), use it to generate the index file +if(NOT MSVC AND GREP) add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/index COMMAND ${GREP} '^[A-Z]' ${CMAKE_CURRENT_SOURCE_DIR}/en_us.l > ${CMAKE_CURRENT_BINARY_DIR}/index MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/en_us.l ) # Otherwise, use langtool to generate the index file -else(GREP) +else(NOT MSVC AND GREP) add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/index COMMAND ${CMAKE_CURRENT_BINARY_DIR}/langtool index ${CMAKE_CURRENT_SOURCE_DIR}/en_us.l ${CMAKE_CURRENT_BINARY_DIR}/index MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/en_us.l DEPENDS langtool ) -endif(GREP) +endif(NOT MSVC AND GREP) # Find all the *.l files within the current source directory, and sort the list file(GLOB LANG_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.l") -- cgit