summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorYehonal <hw.2@hotmail.it>2016-07-28 13:31:07 +0200
committerYehonal <yehonal.azeroth@gmail.com>2016-08-07 12:09:56 +0200
commit548d0db9d57351ba136ce47e84ccac222816c9a2 (patch)
tree8dd522235b79f0f35504c61bc0cddfe63e30905a /CMakeLists.txt
parent4c47ac3d9be6968164deef20fc7da29dc18e8b5e (diff)
skip inclusion of modules without CMakeLists
+ added hook for after load conf
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 143038b0fb..747c3c803c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -42,6 +42,8 @@ if(EXISTS "conf/config.cmake")
include(conf/config.cmake)
endif()
+RUN_HOOK("AFTER_LOAD_CONF")
+
# build in Release-mode by default if not explicitly set
if( NOT CMAKE_BUILD_TYPE )
set(CMAKE_BUILD_TYPE "Release")
@@ -85,8 +87,10 @@ include(src/cmake/showoptions.cmake)
AZTH_SUBDIRLIST(sub_DIRS "${CMAKE_SOURCE_DIR}/modules" FALSE FALSE)
FOREACH(subdir ${sub_DIRS})
STRING(REGEX REPLACE "^${CMAKE_SOURCE_DIR}/" "" subdir ${subdir})
- message("Loading module: ${subdir}")
- add_subdirectory("${subdir}")
+ if(EXISTS "${subdir}/CMakeLists.txt")
+ message("Loading module: ${subdir}")
+ add_subdirectory("${subdir}")
+ endif()
ENDFOREACH()
RUN_HOOK("BEFORE_SRC_LOAD")