summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-12-21 17:42:39 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-12-21 17:42:39 +0000
commit40ec6f0854c2210e670199f701636d9d78ffa6c0 (patch)
tree4f12736acbb0837189fc9d4bf0ab40f0dc6ced16 /lang
parent4ef5ab0306a7c452def271bc4a301b0fb850028f (diff)
Some more CMake edits, this allows versions of CMake as early as 2.4.0 to work now.
Also fixed an issue with adding the dl library to the linker flags, reported by Obi_Wan, thanks! git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1857 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'lang')
-rw-r--r--lang/CMakeLists.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/lang/CMakeLists.txt b/lang/CMakeLists.txt
index 1de7bfca8..c2933ddac 100644
--- a/lang/CMakeLists.txt
+++ b/lang/CMakeLists.txt
@@ -29,14 +29,16 @@ 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")
-list(SORT LANG_SRCS)
+if(CMAKE244_OR_BETTER)
+ list(SORT LANG_SRCS)
+endif(CMAKE244_OR_BETTER)
# Iterate through the language files
foreach(LANG_L ${LANG_SRCS})
# Convert the language file's extension to have no extension
STRING(REGEX REPLACE "\\.l$" "" LANG ${LANG_L})
# Add the language file to the list of compiled language files
- list(APPEND LANGS ${CMAKE_CURRENT_BINARY_DIR}/${LANG})
+ append_to_list(LANGS ${CMAKE_CURRENT_BINARY_DIR}/${LANG})
# Generate a compiled language file using langcomp, as well as having a dependency on the index file being generated
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${LANG}
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/langcomp ${CMAKE_CURRENT_SOURCE_DIR}/${LANG_L} ${CMAKE_CURRENT_BINARY_DIR}/${LANG}