Commit ba3f10bb authored by David Bommes's avatar David Bommes

improved cmake environment

git-svn-id: http://www.openflipper.org/svnrepo/CoMISo/trunk@218 1355f012-dd97-4b2f-ae87-10fa9f823a57
parent 8991a078
...@@ -71,9 +71,9 @@ if(SUITESPARSE_FOUND) ...@@ -71,9 +71,9 @@ if(SUITESPARSE_FOUND)
list( APPEND COMISO_LINK_DIRECTORIES ${SUITESPARSE_LIBRARY_DIRS} ) list( APPEND COMISO_LINK_DIRECTORIES ${SUITESPARSE_LIBRARY_DIRS} )
endif() endif()
#FIND_PACKAGE( Eigen3) #FIND_PACKAGE( EIGEN3)
if(Eigen3_FOUND) if(EIGEN3_FOUND)
list( APPEND COMISO_INCLUDE_DIRECTORIES ${Eigen3_INCLUDE_DIR}) list( APPEND COMISO_INCLUDE_DIRECTORIES ${EIGEN3_INCLUDE_DIR})
endif() endif()
if (CGAL_FOUND) if (CGAL_FOUND)
......
# - Find ADOL-C # - Try to find ADOLC
# Find the native ADOL-C headers and libraries. # Once done this will define
# # ADOLC_FOUND - System has ADOLC
# ADOLC_INCLUDE_DIR - Where to find <adolc/adolc.h>, etc. # ADOLC_INCLUDE_DIRS - The ADOLC include directories
# ADOLC_FOUND - True if ADOL-C found. # ADOLC_LIBRARIES - The libraries needed to use ADOLC
# ADOLC_LIBRARY_DIR - Where to find the library files
# ADOLC_LIBRARIES - Which libraries are available if (ADOLC_INCLUDE_DIR)
# in cache already
IF (ADOLC_INCLUDE_DIR) set(ADOLC_FOUND TRUE)
# Already in cache, be silent set(ADOLC_INCLUDE_DIRS "${ADOLC_INCLUDE_DIR}" )
SET(ADOLC_FIND_QUIETLY TRUE) set(ADOLC_LIBRARIES "${ADOLC_LIBRARY}" )
ENDIF (ADOLC_INCLUDE_DIR) else (ADOLC_INCLUDE_DIR)
GET_FILENAME_COMPONENT(module_file_path ${CMAKE_CURRENT_LIST_FILE} PATH ) message( status "adolc include dir: ${ADOLC_DIR}/include/")
# Look for the header files find_path( ADOLC_INCLUDE_DIR
FIND_PATH(ADOLC_INCLUDE_DIR NAMES adolc/adolc.h NAMES adolc/adolc.h
PATHS /usr/include/adolc PATHS $ENV{ADOLC_DIR}/include/
/usr/local/include /usr/include/adolc
/usr/local/include/adolc/ /usr/local/include
/opt/local/include/adolc/ /usr/local/include/adolc/
${ADOLC_DIR}/include /opt/local/include/adolc/
"c:\\libs\\adolc\\include" "c:\\libs\\adolc\\include"
"c:\\libs\\adolc\\include" "c:\\libs\\adolc\\include"
${PROJECT_SOURCE_DIR}/MacOS/Libs/adolc/include ${PROJECT_SOURCE_DIR}/MacOS/Libs/adolc/include
../../External/include ../../External/include
${module_file_path}/../../../External/include) ${module_file_path}/../../../External/include
)
# Copy the results to the output variables. find_library( ADOLC_LIBRARY
IF(ADOLC_INCLUDE_DIR ) adolc
SET(ADOLC_FOUND 1) PATHS $ENV{ADOLC_DIR}/lib
SET(ADOLC_INCLUDE_DIR ${ADOLC_INCLUDE_DIR}) $ENV{ADOLC_DIR}/lib64
ELSE(ADOLC_INCLUDE_DIR )
SET(ADOLC_FOUND 0)
SET(ADOLC_INCLUDE_DIR)
ENDIF(ADOLC_INCLUDE_DIR )
# Look for the libraries
find_library(ADOLC_LIBRARIES NAMES adolc
PATHS
${ADOLC_INCLUDE_DIR}/../lib
${ADOLC_INCLUDE_DIR}/../lib64
/usr/lib/adolc /usr/lib/adolc
/usr/local/lib /usr/local/lib
/usr/local/lib/adolc/ /usr/local/lib/adolc/
/opt/local/lib/adolc/ /opt/local/lib/adolc/
"c:\\libs\\adolc\\lib" "c:\\libs\\adolc\\lib"
"c:\\libs\\adolc\\lib" "c:\\libs\\adolc\\lib"
${PROJECT_SOURCE_DIR}/MacOS/Libs/adolc/lib ${PROJECT_SOURCE_DIR}/MacOS/Libs/adolc/lib
${ADOLC_DIR}/include /usr/lib64/adolc
/usr/lib64/adolc
/usr/local/lib64 /usr/local/lib64
/usr/local/lib64/adolc/ /usr/local/lib64/adolc/
/opt/local/lib64/adolc/ /opt/local/lib64/adolc/
"c:\\libs\\adolc\\lib64" "c:\\libs\\adolc\\lib64"
"c:\\libs\\adolc\\lib64" "c:\\libs\\adolc\\lib64"
${PROJECT_SOURCE_DIR}/MacOS/Libs/adolc/lib64 ${PROJECT_SOURCE_DIR}/MacOS/Libs/adolc/lib64
DOC "Path to the ADOL-C library" DOC "ADOL-C library"
) )
set(ADOLC_INCLUDE_DIRS "${ADOLC_INCLUDE_DIR}" )
set(ADOLC_LIBRARIES "${ADOLC_LIBRARY}" )
get_filename_component(ADOLC_LIBRARY_DIR ${ADOLC_LIBRARIES} PATH CACHE) include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBCPLEX_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(ADOLC DEFAULT_MSG
ADOLC_LIBRARY ADOLC_INCLUDE_DIR)
# Report the results. mark_as_advanced(ADOLC_INCLUDE_DIR ADOLC_LIBRARY)
IF(NOT ADOLC_FOUND)
SET(ADOLC_DIR_MESSAGE
"ADOLC was not found. Make sure ADOLC_INCLUDE_DIR is set to the directories containing the include and lib files for ADOLC.")
ELSE (NOT ADOLC_FOUND)
ADD_DEFINITIONS(-DADOLC_AVAILABLE)
IF(NOT ADOLC_FIND_QUIETLY)
MESSAGE(STATUS "Looking for ADOLC - found")
ENDIF(NOT ADOLC_FIND_QUIETLY)
ENDIF(NOT ADOLC_FOUND)
endif(ADOLC_INCLUDE_DIR)
...@@ -193,17 +193,17 @@ if ( COMISO_INCLUDE_DIR ) ...@@ -193,17 +193,17 @@ if ( COMISO_INCLUDE_DIR )
endif() endif()
STRING(REGEX MATCH "\#define COMISO_Eigen3_AVAILABLE 1" COMISO_Eigen3_BUILD_TIME_AVAILABLE ${CURRENT_COMISO_CONFIG} ) STRING(REGEX MATCH "\#define COMISO_EIGEN3_AVAILABLE 1" COMISO_EIGEN3_BUILD_TIME_AVAILABLE ${CURRENT_COMISO_CONFIG} )
if ( COMISO_Eigen3_BUILD_TIME_AVAILABLE ) if ( COMISO_EIGEN3_BUILD_TIME_AVAILABLE )
find_package(Eigen3) find_package(EIGEN3)
if ( NOT Eigen3_FOUND ) if ( NOT EIGEN3_FOUND )
message(ERROR "COMISO configured with Eigen3 but Eigen3 not available") message(ERROR "COMISO configured with EIGEN3 but EIGEN3 not available")
endif() endif()
list (APPEND COMISO_OPT_DEPS "Eigen3") list (APPEND COMISO_OPT_DEPS "EIGEN3")
endif() endif()
......
# - Find GMM # - Try to find GMM
# Find the native GMM headers and libraries. # Once done this will define
# # GMM_FOUND - System has GMM
# GMM_INCLUDE_DIR - where to find GMM.h, etc. # GMM_INCLUDE_DIRS - The GMM include directories
# GMM_LIBRARIES - List of libraries when using GMM. # GMM_COMPILER_FLAGS - Compiler flags that are necessary for GMM
# GMM_FOUND - True if GMM found.
if (GMM_INCLUDE_DIR)
IF (GMM_INCLUDE_DIR) # in cache already
# Already in cache, be silent set(GMM_FOUND TRUE)
SET(GMM_FIND_QUIETLY TRUE) set(GMM_INCLUDE_DIRS "${GMM_INCLUDE_DIR}" )
ENDIF (GMM_INCLUDE_DIR) else (GMM_INCLUDE_DIR)
GET_FILENAME_COMPONENT(module_file_path ${CMAKE_CURRENT_LIST_FILE} PATH ) find_path( GMM_INCLUDE_DIR
NAMES gmm/gmm.h
# Look for the header file. PATHS $ENV{GMM_DIR}
FIND_PATH(GMM_INCLUDE_DIR NAMES gmm/gmm.h /usr/include
PATHS /usr/include /usr/include
/usr/include /usr/local/include
/usr/local/include ~/sw/gmm-4.1/include
~/sw/gmm-4.1/include "c:\\libs\\gmm-4.1\\include"
"c:\\libs\\gmm-4.1\\include" "c:\\libs\\gmm-3.0\\include"
"c:\\libs\\gmm-3.0\\include" ${PROJECT_SOURCE_DIR}/MacOS/Libs/gmm-3.1/include
${PROJECT_SOURCE_DIR}/MacOS/Libs/gmm-3.1/include ../../External/include
../../External/include /ACG/acgdev/gcc-4.3-i686/gmm-4.1/include/
/ACG/acgdev/gcc-4.3-i686/gmm-4.1/include/ /ACG/acgdev/gcc-4.3-i686/gmm-3/include/
/ACG/acgdev/gcc-4.3-i686/gmm-3/include/ ${module_file_path}/../../../External/include
${module_file_path}/../../../External/include $ENV{HOME}/opt/gmm/gmm-4.2/include
$ENV{HOME}/opt/gmm/gmm-4.2/include) )
set(GMM_INCLUDE_DIRS "${GMM_INCLUDE_DIR}" )
# Copy the results to the output variables.
IF(GMM_INCLUDE_DIR )
SET(GMM_FOUND 1) # use c++ headers as default
SET(GMM_INCLUDE_DIR ${GMM_INCLUDE_DIR}) IF (WIN32)
IF (WIN32) set(GMM_COMPILER_FLAGS "-D_SCL_SECURE_NO_DEPRECATE" CACHE STRING "GMM Compiler Flags")
add_definitions(-D_SCL_SECURE_NO_DEPRECATE) # add_definitions(-D_SCL_SECURE_NO_DEPRECATE)
ENDIF(WIN32) ELSE(WIN32)
ELSE(GMM_INCLUDE_DIR ) set(GMM_COMPILER_FLAGS "" CACHE STRING "GMM Compiler Flags")
SET(GMM_FOUND 0) ENDIF(WIN32)
SET(GMM_INCLUDE_DIR)
ENDIF(GMM_INCLUDE_DIR ) include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBCPLEX_FOUND to TRUE
# Report the results. # if all listed variables are TRUE
IF(NOT GMM_FOUND) find_package_handle_standard_args(GMM DEFAULT_MSG
SET(GMM_DIR_MESSAGE GMM_INCLUDE_DIR)
"GMM was not found. Make sure GMM_INCLUDE_DIR is set to the directories containing the include and lib files for GMM. .")
IF(GMM_FIND_REQUIRED) mark_as_advanced(GMM_INCLUDE_DIR GMM_COMPILER_FLAGS)
MESSAGE(FATAL_ERROR "${GMM_DIR_MESSAGE}")
ELSEIF(NOT GMM_FIND_QUIETLY) endif(GMM_INCLUDE_DIR)
MESSAGE(STATUS "${GMM_DIR_MESSAGE}")
ELSE(NOT GMM_FIND_QUIETLY)
ENDIF(GMM_FIND_REQUIRED)
ELSE (NOT GMM_FOUND)
IF(NOT GMM_FIND_QUIETLY)
MESSAGE(STATUS "Looking for GMM - found")
ENDIF(NOT GMM_FIND_QUIETLY)
ENDIF(NOT GMM_FOUND)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment