diff options
-rw-r--r-- | cmake/Anope.cmake | 2 | ||||
-rw-r--r-- | modules/CMakeLists.txt | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/cmake/Anope.cmake b/cmake/Anope.cmake index b4eadf279..587e32980 100644 --- a/cmake/Anope.cmake +++ b/cmake/Anope.cmake @@ -208,7 +208,7 @@ macro(read_from_file FILE REGEX STRINGS) endif(REGEX STREQUAL "") else(CMAKE26_OR_BETTER) # For CMake 2.4.x, we need to do this manually, firstly we read the file in - execute_process(COMMAND ${CMAKE_COMMAND} -DFILE:STRING=${FILE} -P ${Anope_SOURCE_DIR}/ReadFile.cmake ERROR_VARIABLE ALL_STRINGS) + execute_process(COMMAND ${CMAKE_COMMAND} -DFILE:STRING=${FILE} -P ${Anope_SOURCE_DIR}/cmake/ReadFile.cmake ERROR_VARIABLE ALL_STRINGS) # Next we replace all newlines with semicolons string(REGEX REPLACE "\n" ";" ALL_STRINGS ${ALL_STRINGS}) if(REGEX STREQUAL "") diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index 1e503d1c3..e9afbf45b 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -3,7 +3,7 @@ if(WIN32) add_definitions(-DMODULE_COMPILE) endif(WIN32) -function(build_modules SRC) +macro(build_modules SRC) if(NOT ${SRC} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR} AND EXISTS "${SRC}/CMakeLists.txt") add_subdirectory("${SRC}") else(NOT ${SRC} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR} AND EXISTS "${SRC}/CMakeLists.txt") @@ -76,9 +76,9 @@ function(build_modules SRC) endif(IS_DIRECTORY "${MODULE_SRC}") endforeach(MODULE_SRC ${MODULES_SRCS}) endif(NOT ${SRC} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR} AND EXISTS "${SRC}/CMakeLists.txt") -endfunction(build_modules) +endmacro(build_modules) -function(build_subdir) +macro(build_subdir) file(GLOB_RECURSE MODULES_SUBDIR_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cpp") sort_list(MODULES_SUBDIR_SRCS) @@ -159,7 +159,7 @@ function(build_subdir) install(TARGETS ${SO} DESTINATION ${LIB_DIR}/modules) endif(HAS_FUNCTION) -endfunction(build_subdir) +endmacro(build_subdir) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) build_modules(${CMAKE_CURRENT_SOURCE_DIR}) |