* All Tools:
- Change: Using more Bootstrap macros. Simpler way of setting the CMAKE_MODULE_PATH.
This commit is contained in:
parent
d1f225d4bf
commit
9ba2c5c0bc
|
@ -1,76 +1,36 @@
|
||||||
PROJECT(CRLCORE)
|
|
||||||
|
|
||||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.0)
|
project(CRLCORE)
|
||||||
|
|
||||||
#IF(COMMAND CMAKE_POLICY)
|
cmake_minimum_required(VERSION 2.4.0)
|
||||||
# CMAKE_POLICY(SET CMP0003 NEW)
|
|
||||||
# CMAKE_POLICY(SET CMP0005 NEW)
|
|
||||||
# IF(NOT (CMAKE_VERSION VERSION_LESS 2.8.0))
|
|
||||||
# CMAKE_POLICY(SET CMP0014 OLD)
|
|
||||||
# ENDIF(NOT (CMAKE_VERSION VERSION_LESS 2.8.0))
|
|
||||||
#ENDIF(COMMAND CMAKE_POLICY)
|
|
||||||
|
|
||||||
# This macro has to be included in all the tools CMakeLists.txt as it's
|
list(INSERT CMAKE_MODULE_PATH 0 "$ENV{BOOTSTRAP_TOP}/share/cmake/Modules/")
|
||||||
# the sole means of localizing other tools/projects.
|
find_package(Bootstrap REQUIRED)
|
||||||
MACRO(SETUP_PROJECT_PATHS project)
|
setup_project_paths(VLSISAPD)
|
||||||
IF( NOT("$ENV{${project}_TOP}" STREQUAL "") )
|
setup_project_paths(CORIOLIS)
|
||||||
MESSAGE("-- ${project}_TOP is set to $ENV{${project}_TOP}")
|
list(INSERT CMAKE_MODULE_PATH 0 "${CRLCORE_SOURCE_DIR}/cmake_modules/")
|
||||||
SET(PROJECT_MODULE_PATH "${DESTDIR}$ENV{${project}_TOP}/share/cmake/Modules/")
|
print_cmake_module_path()
|
||||||
LIST(INSERT CMAKE_MODULE_PATH 0 "${PROJECT_MODULE_PATH}")
|
|
||||||
ENDIF( NOT("$ENV{${project}_TOP}" STREQUAL "") )
|
|
||||||
|
|
||||||
IF( NOT("$ENV{${project}_USER_TOP}" STREQUAL "") )
|
setup_sysconfdir("$ENV{CORIOLIS_TOP}")
|
||||||
MESSAGE("-- ${project}_USER_TOP is set to $ENV{${project}_USER_TOP}")
|
set_cmake_policies()
|
||||||
SET(PROJECT_MODULE_PATH "${DESTDIR}$ENV{${project}_USER_TOP}/share/cmake/Modules/")
|
set_lib_link_mode()
|
||||||
LIST(INSERT CMAKE_MODULE_PATH 0 "${PROJECT_MODULE_PATH}")
|
setup_boost(program_options filesystem python regex)
|
||||||
ENDIF( NOT("$ENV{${project}_USER_TOP}" STREQUAL "") )
|
|
||||||
|
|
||||||
LIST(REMOVE_DUPLICATES CMAKE_MODULE_PATH)
|
find_package(LibXml2 REQUIRED)
|
||||||
ENDMACRO(SETUP_PROJECT_PATHS project)
|
find_package(PythonLibs REQUIRED)
|
||||||
|
find_package(PythonSitePackages REQUIRED)
|
||||||
SETUP_PROJECT_PATHS(BOOTSTRAP)
|
set(QT_USE_QTXML "true")
|
||||||
SETUP_PROJECT_PATHS(VLSISAPD)
|
find_package(Qt4 REQUIRED) # find and setup Qt4 for this project
|
||||||
SETUP_PROJECT_PATHS(CORIOLIS)
|
find_package(BISON REQUIRED)
|
||||||
|
find_package(FLEX REQUIRED)
|
||||||
LIST(INSERT CMAKE_MODULE_PATH 0 "${CRLCORE_SOURCE_DIR}/cmake_modules/")
|
find_package(LEFDEF)
|
||||||
|
find_package(OPENACCESS)
|
||||||
MESSAGE("-- Components of CMAKE_MODULE_PATH:")
|
find_package(VLSISAPD REQUIRED)
|
||||||
FOREACH(PATH IN LISTS CMAKE_MODULE_PATH)
|
find_package(HURRICANE REQUIRED)
|
||||||
MESSAGE("-- ${PATH}")
|
include(UseLATEX)
|
||||||
ENDFOREACH(PATH)
|
|
||||||
|
add_subdirectory(src)
|
||||||
STRING(REGEX MATCH "^/usr" IS_USR "$ENV{CORIOLIS_TOP}")
|
add_subdirectory(etc)
|
||||||
STRING(REGEX MATCH "^/opt" IS_OPT "$ENV{CORIOLIS_TOP}")
|
add_subdirectory(cmake_modules)
|
||||||
IF(IS_USR OR IS_OPT)
|
if(BUILD_DOC)
|
||||||
MESSAGE("-- Using system-wide /etc.")
|
add_subdirectory(doc)
|
||||||
SET(SYS_CONF_DIR "/etc" CACHE STRING "System configuration directory (/etc)" FORCE)
|
endif(BUILD_DOC)
|
||||||
ELSE(IS_USR OR IS_OPT)
|
|
||||||
MESSAGE("-- Using install tree /etc.")
|
|
||||||
SET(SYS_CONF_DIR "etc" CACHE STRING "System configuration directory (/etc)" FORCE)
|
|
||||||
ENDIF(IS_USR OR IS_OPT)
|
|
||||||
|
|
||||||
SET(QT_USE_QTXML "true")
|
|
||||||
|
|
||||||
FIND_PACKAGE(Bootstrap REQUIRED)
|
|
||||||
set_cmake_policies()
|
|
||||||
set_lib_link_mode()
|
|
||||||
setup_boost(program_options filesystem python regex)
|
|
||||||
|
|
||||||
FIND_PACKAGE(LibXml2 REQUIRED)
|
|
||||||
FIND_PACKAGE(PythonLibs REQUIRED)
|
|
||||||
FIND_PACKAGE(PythonSitePackages REQUIRED)
|
|
||||||
FIND_PACKAGE(Qt4 REQUIRED) # find and setup Qt4 for this project
|
|
||||||
FIND_PACKAGE(BISON REQUIRED)
|
|
||||||
FIND_PACKAGE(FLEX REQUIRED)
|
|
||||||
FIND_PACKAGE(LEFDEF)
|
|
||||||
FIND_PACKAGE(OPENACCESS)
|
|
||||||
FIND_PACKAGE(VLSISAPD REQUIRED)
|
|
||||||
FIND_PACKAGE(HURRICANE REQUIRED)
|
|
||||||
INCLUDE(UseLATEX)
|
|
||||||
|
|
||||||
ADD_SUBDIRECTORY(src)
|
|
||||||
ADD_SUBDIRECTORY(etc)
|
|
||||||
ADD_SUBDIRECTORY(cmake_modules)
|
|
||||||
IF(BUILD_DOC)
|
|
||||||
ADD_SUBDIRECTORY(doc)
|
|
||||||
ENDIF(BUILD_DOC)
|
|
||||||
|
|
Loading…
Reference in New Issue