Commit 4052e566 authored by David Bommes's avatar David Bommes

cmake updates

git-svn-id: http://www.openflipper.org/svnrepo/CoMISo/trunk@216 1355f012-dd97-4b2f-ae87-10fa9f823a57
parent 3841d82d
# add our macro directory to cmake search path
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
include (ACGCommon)
find_package(COMISO)
find_package(CoMISo)
#find_package(MUMPS)
if (MUMPS_FOUND )
......@@ -73,8 +76,29 @@ if(Eigen3_FOUND)
list( APPEND COMISO_INCLUDE_DIRECTORIES ${Eigen3_INCLUDE_DIR})
endif()
if (CGAL_FOUND)
list( APPEND COMISO_INCLUDE_DIRECTORIES ${CGAL_INCLUDE_DIR} )
list( APPEND COMISO_LINK_DIRECTORIES ${CGAL_LIBRARY_DIR} )
list( APPEND COMISO_LINK_LIBRARIES ${CGAL_LIBRARIES} )
endif()
if (CPLEX_FOUND)
list( APPEND COMISO_INCLUDE_DIRECTORIES ${CPLEX_INCLUDE_DIRS} )
list( APPEND COMISO_LINK_LIBRARIES ${CPLEX_LIBRARIES} )
#enable c++ support
add_definitions(-DIL_STD)
endif()
if (GUROBI_FOUND )
list( APPEND COMISO_INCLUDE_DIRECTORIES ${GUROBI_INCLUDE_DIRS} )
list( APPEND COMISO_LINK_LIBRARIES ${GUROBI_LIBRARIES} )
endif ()
#MESSAGE( ${COMISO_LINK_LIBRARIES})
#ToDo:
#list( APPEND COMISO_LINK_LIBRARIES "pthread" )
include_directories (
..
${CMAKE_SOURCE_DIR}
......
......@@ -14,7 +14,8 @@ GET_FILENAME_COMPONENT(module_file_path ${CMAKE_CURRENT_LIST_FILE} PATH )
IF (NOT APPLE )
# Look for the header file.
FIND_PATH(CGAL_INCLUDE_DIR NAMES CGAL/auto_link/auto_link.h
PATHS ../../External/include
PATHS /usr/include
../../External/include
"C:/libs/CGAL-3.6/include"
"C:/Program Files/CGAL-3.5/include"
"C:/Programme/CGAL-3.5/include"
......@@ -61,14 +62,14 @@ IF(CGAL_INCLUDE_DIR )
PATHS "/opt/local/lib/"
DOC "Directory containing the CGAL library"
)
list ( APPEND CGAL_LIBRARIES CGAL CGAL_Core CGAL_ImageIO )
list ( APPEND CGAL_LIBRARIES CGAL CGAL_Core CGAL_ImageIO mpfr )
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -frounding-math")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -frounding-math")
ELSE( WIN32 )
find_path(CGAL_LIBRARY_DIR
NAMES "libCGAL.so"
PATHS "/usr/lib/"
PATHS "/usr/lib/" "/usr/lib64"
DOC "Directory containing the CGAL library"
)
list ( APPEND CGAL_LIBRARIES CGAL CGAL_Core CGAL_ImageIO CGAL_Qt4)
......
......@@ -8,7 +8,7 @@ if (CPLEX_INCLUDE_DIR)
# in cache already
set(CPLEX_FOUND TRUE)
set(CPLEX_INCLUDE_DIRS "${CPLEX_INCLUDE_DIR};${CPLEX_CONCERT_INCLUDE_DIR}" )
set(CPLEX_LIBRARIES "${CPLEX_LIBRARY};${CPLEX_ILO_LIBRARY};${CPLEX_CONCERT_LIBRARY}" )
set(CPLEX_LIBRARIES "${CPLEX_LIBRARY};${CPLEX_ILO_LIBRARY};${CPLEX_CONCERT_LIBRARY};${CPLEX_PTHREAD_LIBRARY}" )
else (CPLEX_INCLUDE_DIR)
find_path(CPLEX_INCLUDE_DIR
......@@ -37,11 +37,21 @@ find_library( CPLEX_CONCERT_LIBRARY
concert
PATHS "$ENV{CPLEX_DIR}/concert/lib/x86-64_sles10_4.1/static_pic"
"$ENV{CPLEX_DIR}/concert/lib/x86-64_darwin/static_pic/"
)
)
find_library( CPLEX_PTHREAD_LIBRARY
pthread
PATHS "/usr/lib"
"/usr/lib64"
"/lib"
"/lib64"
)
set(CPLEX_INCLUDE_DIRS "${CPLEX_INCLUDE_DIR};${CPLEX_CONCERT_INCLUDE_DIR}" )
set(CPLEX_LIBRARIES "${CPLEX_LIBRARY};${CPLEX_ILO_LIBRARY};${CPLEX_CONCERT_LIBRARY}" )
#set(CPLEX_LIBRARIES "${CPLEX_LIBRARY};${CPLEX_ILO_LIBRARY};${CPLEX_CONCERT_LIBRARY}" )
set(CPLEX_LIBRARIES "${CPLEX_LIBRARY};${CPLEX_ILO_LIBRARY};${CPLEX_CONCERT_LIBRARY};${CPLEX_PTHREAD_LIBRARY}" )
# use c++ headers as default
set(CPLEX_COMPILER_FLAGS "-DIL_STD" CACHE STRING "Cplex Compiler Flags")
......@@ -52,6 +62,6 @@ include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CPLEX DEFAULT_MSG
CPLEX_LIBRARY CPLEX_INCLUDE_DIR CPLEX_CONCERT_INCLUDE_DIR CPLEX_ILO_LIBRARY CPLEX_CONCERT_LIBRARY)
mark_as_advanced(CPLEX_INCLUDE_DIR CPLEX_LIBRARY CPLEX_CONCERT_INCLUDE_DIR CPLEX_ILO_LIBRARY CPLEX_CONCERT_LIBRARY)
mark_as_advanced(CPLEX_INCLUDE_DIR CPLEX_LIBRARY CPLEX_CONCERT_INCLUDE_DIR CPLEX_ILO_LIBRARY CPLEX_CONCERT_LIBRARY CPLEX_PTHREAD_LIBRARY)
endif(CPLEX_INCLUDE_DIR)
......@@ -15,7 +15,7 @@ ENDIF (TAUCS_INCLUDE_DIR)
IF(WIN32)
find_package(CGAL)
if (NOT CGAL_FOUND)
message(FATAL_ERROR "CGAL not found .. required to use taucs!")
message(STATUS "CGAL not found .. required to use taucs!")
endif()
FIND_PATH(TAUCS_INCLUDE_DIR NAMES taucs.h
......@@ -46,7 +46,7 @@ IF(TAUCS_INCLUDE_DIR )
SET(TAUCS_INCLUDE_DIR ${TAUCS_INCLUDE_DIR})
IF(WIN32)
find_package(CGAL)
# find_package(CGAL)
SET(TAUCS_LIBRARY "${CGAL_TAUCS_DIR}/lib/libtaucs.lib" )
ELSE(WIN32)
IF(APPLE)
......
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