Add a small bootstrapper to locate build system

Currently this bootstrapper only finds the macros that are located
in the cmake/ tree in this project. Projects that don't carry their
own build system can specify search locations here.
This commit is contained in:
Roland Kaufmann 2013-08-14 21:31:53 +02:00
parent 3df0f06f45
commit e14cb185ad

View File

@ -17,7 +17,13 @@
cmake_minimum_required (VERSION 2.8)
# additional search modules
list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules")
find_path (OPM_MACROS_ROOT cmake/Modules/OpmInit.cmake
PATHS ${opm-macros_ROOT}
${CMAKE_CURRENT_SOURCE_DIR}
DOC "Path to build system macros and scripts"
NO_DEFAULT_PATH
)
list (APPEND CMAKE_MODULE_PATH "${OPM_MACROS_ROOT}/cmake/Modules")
# not the same location as most of the other projects; this hook overrides
macro (dir_hook)