Commit cd161990 authored by Jan Möbius's avatar Jan Möbius
Browse files

Updated finders

parent 575f9c4f
if ( NOT CGAL_GENERATOR_SPECIFIC_SETTINGS_FILE_INCLUDED ) if ( NOT CGAL_GENERATOR_SPECIFIC_SETTINGS_FILE_INCLUDED )
set( CGAL_GENERATOR_SPECIFIC_SETTINGS_FILE_INCLUDED 1 ) set( CGAL_GENERATOR_SPECIFIC_SETTINGS_FILE_INCLUDED 1 )
message( STATUS "Targetting ${CMAKE_GENERATOR}")
if ( MSVC ) if ( MSVC )
message( STATUS "Target build enviroment supports auto-linking" )
set(CGAL_AUTO_LINK_ENABLED TRUE) set(CGAL_AUTO_LINK_ENABLED TRUE)
endif() endif()
if (MSVC12) if ( MSVC15 )
set(CGAL_TOOLSET "vc150")
message( STATUS "Using VC15 compiler." )
elseif ( MSVC14 )
set(CGAL_TOOLSET "vc140")
message( STATUS "Using VC14 compiler." )
elseif ( MSVC12 )
set(CGAL_TOOLSET "vc120") set(CGAL_TOOLSET "vc120")
elseif ( MSVC11 ) message( STATUS "Using VC12 compiler." )
set(CGAL_TOOLSET "vc110") elseif ( MSVC11 )
elseif ( MSVC10 ) set(CGAL_TOOLSET "vc110")
set(CGAL_TOOLSET "vc100") message( STATUS "Using VC11 compiler." )
elseif ( MSVC90 ) elseif ( MSVC10 )
set(CGAL_TOOLSET "vc100")
message( STATUS "Using VC10 compiler." )
elseif ( MSVC90 )
set(CGAL_TOOLSET "vc90") set(CGAL_TOOLSET "vc90")
elseif ( MSVC80 ) message( STATUS "Using VC90 compiler." )
elseif ( MSVC80 )
set(CGAL_TOOLSET "vc80") set(CGAL_TOOLSET "vc80")
message( STATUS "Using VC80 compiler." )
elseif ( MSVC71 ) elseif ( MSVC71 )
set(CGAL_TOOLSET "vc71") set(CGAL_TOOLSET "vc71")
message( STATUS "Using VC71 compiler." )
else()
message( STATUS "Using ${CMAKE_CXX_COMPILER} compiler." )
endif() endif()
...@@ -24,13 +41,16 @@ if ( NOT CGAL_GENERATOR_SPECIFIC_SETTINGS_FILE_INCLUDED ) ...@@ -24,13 +41,16 @@ if ( NOT CGAL_GENERATOR_SPECIFIC_SETTINGS_FILE_INCLUDED )
IF (APPLE) IF (APPLE)
exec_program(uname ARGS -v OUTPUT_VARIABLE DARWIN_VERSION) exec_program(uname ARGS -v OUTPUT_VARIABLE DARWIN_VERSION)
string(REGEX MATCH "[0-9]+" DARWIN_VERSION ${DARWIN_VERSION}) string(REGEX MATCH "[0-9]+" DARWIN_VERSION ${DARWIN_VERSION})
message(STATUS "DARWIN_VERSION=${DARWIN_VERSION}")
if (DARWIN_VERSION GREATER 8) if (DARWIN_VERSION GREATER 8)
message(STATUS "Mac Leopard detected")
set(CGAL_APPLE_LEOPARD 1) set(CGAL_APPLE_LEOPARD 1)
endif() endif()
endif() endif()
if ( NOT "${CMAKE_CFG_INTDIR}" STREQUAL "." ) if ( NOT "${CMAKE_CFG_INTDIR}" STREQUAL "." )
set(HAS_CFG_INTDIR TRUE CACHE INTERNAL "Generator uses intermediate configuration directory" ) set(HAS_CFG_INTDIR TRUE CACHE INTERNAL "Generator uses intermediate configuration directory" )
message( STATUS "Generator uses intermediate configuration directory: ${CMAKE_CFG_INTDIR}" )
endif() endif()
endif() endif()
...@@ -11,22 +11,47 @@ ENDIF (CGAL_INCLUDE_DIR) ...@@ -11,22 +11,47 @@ ENDIF (CGAL_INCLUDE_DIR)
GET_FILENAME_COMPONENT(module_file_path ${CMAKE_CURRENT_LIST_FILE} PATH ) GET_FILENAME_COMPONENT(module_file_path ${CMAKE_CURRENT_LIST_FILE} PATH )
# Check if the base path is set
if ( NOT CMAKE_WINDOWS_LIBS_DIR )
# This is the base directory for windows library search used in the finders we shipp.
set(CMAKE_WINDOWS_LIBS_DIR "c:/libs" CACHE STRING "Default Library search dir on windows." )
endif()
if ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*Win64" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2012/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2012/x32/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 12.*Win64" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2013/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 12.*" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2013/x32/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 14.*Win64" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2015/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 14.*" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2015/x32/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 15.*Win64" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2017/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 15.*" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2017/x32/")
endif()
IF (NOT APPLE ) IF (NOT APPLE )
# Look for the header file. # Look for the header file.
FIND_PATH(CGAL_INCLUDE_DIR NAMES CGAL/auto_link/auto_link.h FIND_PATH(CGAL_INCLUDE_DIR NAMES CGAL/auto_link/auto_link.h
PATHS /usr/include PATHS "${VS_SEARCH_PATH}/CGAL-4.12/include"
/usr/include
../../External/include ../../External/include
$ENV{CGAL_DIR}/include $ENV{CGAL_DIR}/include
"C:/libs/CGAL-3.6/include" "C:/libs/CGAL-3.6/include"
"C:/Program Files/CGAL-3.5/include" "C:/Program Files/CGAL-3.5/include"
"C:/Programme/CGAL-3.5/include" "C:/Programme/CGAL-3.5/include"
"C:/libs/CGAL-3.5/include" "C:/libs/CGAL-3.5/include"
"C:/Program Files/CGAL-3.4/include" "C:/Program Files/CGAL-3.4/include"
"C:/Programme/CGAL-3.4/include" "C:/Programme/CGAL-3.4/include"
"C:/libs/CGAL-3.4/include" "C:/libs/CGAL-3.4/include"
"C:/Programme/CGAL-3.9/include" "C:/Programme/CGAL-3.9/include"
"C:/Program Files/CGAL-3.9/include" "C:/Program Files/CGAL-3.9/include"
"C:/Program Files (x86)/CGAL-3.9/include" "C:/Program Files (x86)/CGAL-3.9/include"
${module_file_path}/../../../External/include ) ${module_file_path}/../../../External/include )
ELSE( NOT APPLE) ELSE( NOT APPLE)
# Look for the header file. # Look for the header file.
...@@ -41,9 +66,11 @@ ENDIF( NOT APPLE ) ...@@ -41,9 +66,11 @@ ENDIF( NOT APPLE )
MARK_AS_ADVANCED(CGAL_INCLUDE_DIR) MARK_AS_ADVANCED(CGAL_INCLUDE_DIR)
if ("${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1}" MATCHES ".*clang.*") if ("${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1}" MATCHES ".*clang.*")
SET(CXX_IS_CLANG true) SET(CXX_IS_CLANG true)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "[cC][lL][aA][nN][gG]")
SET(CXX_IS_CLANG true)
else() else()
SET(CXX_IS_CLANG false) SET(CXX_IS_CLANG false)
endif() endif()
# Copy the results to the output variables. # Copy the results to the output variables.
...@@ -57,14 +84,21 @@ IF(CGAL_INCLUDE_DIR ) ...@@ -57,14 +84,21 @@ IF(CGAL_INCLUDE_DIR )
IF(WIN32) IF(WIN32)
include(CGAL_GeneratorSpecificSettings) include(CGAL_GeneratorSpecificSettings)
find_path(CGAL_LIBRARY_DIR find_path(CGAL_LIBRARY_DIR
NAMES "CGAL-${CGAL_TOOLSET}-mt.lib" "CGAL-${CGAL_TOOLSET}-mt-gd.lib" "CGAL-${CGAL_TOOLSET}-mt-4.5.lib" NAMES "CGAL-${CGAL_TOOLSET}-mt.lib"
"CGAL-${CGAL_TOOLSET}-mt-gd.lib"
"CGAL-${CGAL_TOOLSET}-mt-4.12.lib"
"CGAL-${CGAL_TOOLSET}-mt-4.7.lib"
"CGAL-${CGAL_TOOLSET}-mt-4.5.lib"
PATHS "${CGAL_INCLUDE_DIR}/../lib" PATHS "${CGAL_INCLUDE_DIR}/../lib"
DOC "Directory containing the CGAL library" DOC "Directory containing the CGAL library"
) )
# Binary dir for DLLs # Binary dir for DLLs
find_path(CGAL_BIN_DIR find_path(CGAL_BIN_DIR
NAMES "CGAL-${CGAL_TOOLSET}-mt-4.5.dll" "CGAL-${CGAL_TOOLSET}-mt-gd.dll" NAMES "CGAL-${CGAL_TOOLSET}-mt-4.12.dll"
"CGAL-${CGAL_TOOLSET}-mt-4.7.dll"
"CGAL-${CGAL_TOOLSET}-mt-4.5.dll"
"CGAL-${CGAL_TOOLSET}-mt-gd.dll"
PATHS "${CGAL_INCLUDE_DIR}/../bin" PATHS "${CGAL_INCLUDE_DIR}/../bin"
DOC "Directory containing the CGAL DLLs" DOC "Directory containing the CGAL DLLs"
) )
......
...@@ -37,10 +37,15 @@ if (WIN32) ...@@ -37,10 +37,15 @@ if (WIN32)
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2015/x64/") SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2015/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 14.*" ) elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 14.*" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2015/x32/") SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2015/x32/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 15.*Win64" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2017/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 15.*" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2017/x32/")
endif() endif()
find_path(IPOPT_INCLUDE_DIR NAMES IpNLP.hpp find_path(IPOPT_INCLUDE_DIR NAMES IpNLP.hpp
PATHS PATHS
"${VS_SEARCH_PATH}Ipopt-3.12.9/include/coin"
"${VS_SEARCH_PATH}Ipopt-3.12.4/Ipopt/MSVisualStudio/v8-ifort/installed/include/coin" "${VS_SEARCH_PATH}Ipopt-3.12.4/Ipopt/MSVisualStudio/v8-ifort/installed/include/coin"
"${VS_SEARCH_PATH}Ipopt-3.11.9/Ipopt/MSVisualStudio/v8-ifort/installed/include/coin" "${VS_SEARCH_PATH}Ipopt-3.11.9/Ipopt/MSVisualStudio/v8-ifort/installed/include/coin"
"C:\\libs\\Ipopt-3.8.2\\include\\coin" "C:\\libs\\Ipopt-3.8.2\\include\\coin"
...@@ -51,14 +56,16 @@ if (WIN32) ...@@ -51,14 +56,16 @@ if (WIN32)
find_library( IPOPT_LIBRARY_RELEASE find_library( IPOPT_LIBRARY_RELEASE
Ipopt ipopt libipopt IpOpt-vc10 Ipopt ipopt libipopt IpOpt-vc10
PATHS "C:\\libs\\Ipopt-3.8.2\\lib\\win32\\release" PATHS "C:\\libs\\Ipopt-3.8.2\\lib\\win32\\release"
"${VS_SEARCH_PATH}Ipopt-3.12.4/Ipopt/MSVisualStudio/v8-ifort/installed/lib" "${VS_SEARCH_PATH}Ipopt-3.12.9/lib"
"${VS_SEARCH_PATH}Ipopt-3.11.9/Ipopt/MSVisualStudio/v8-ifort/installed/lib" "${VS_SEARCH_PATH}Ipopt-3.12.4/Ipopt/MSVisualStudio/v8-ifort/installed/lib"
"${VS_SEARCH_PATH}Ipopt-3.11.9/Ipopt/MSVisualStudio/v8-ifort/installed/lib"
) )
find_library( IPOPT_LIBRARY_DEBUG find_library( IPOPT_LIBRARY_DEBUG
Ipopt ipoptd libipoptd IpOpt-vc10d Ipopt ipoptd libipoptd IpOpt-vc10d
PATHS "C:\\libs\\Ipopt-3.8.2\\lib\\win32\\debug" PATHS "C:\\libs\\Ipopt-3.8.2\\lib\\win32\\debug"
"${VS_SEARCH_PATH}Ipopt-3.12.4/Ipopt/MSVisualStudio/v8-ifort/installed/lib" "${VS_SEARCH_PATH}Ipopt-3.12.9/lib"
"${VS_SEARCH_PATH}Ipopt-3.11.9/Ipopt/MSVisualStudio/v8-ifort/installed/lib" "${VS_SEARCH_PATH}Ipopt-3.12.4/Ipopt/MSVisualStudio/v8-ifort/installed/lib"
"${VS_SEARCH_PATH}Ipopt-3.11.9/Ipopt/MSVisualStudio/v8-ifort/installed/lib"
) )
set ( IPOPT_LIBRARY "optimized;${IPOPT_LIBRARY_RELEASE};debug;${IPOPT_LIBRARY_DEBUG}" CACHE STRING "IPOPT Libraries" ) set ( IPOPT_LIBRARY "optimized;${IPOPT_LIBRARY_RELEASE};debug;${IPOPT_LIBRARY_DEBUG}" CACHE STRING "IPOPT Libraries" )
......
...@@ -19,16 +19,18 @@ ...@@ -19,16 +19,18 @@
# Set MPFR_INCLUDES # Set MPFR_INCLUDES
find_package(CGAL)
find_path(MPFR_INCLUDES find_path(MPFR_INCLUDES
NAMES NAMES
mpfr.h mpfr.h
PATHS PATHS
$ENV{GMPDIR} $ENV{GMPDIR}
${INCLUDE_INSTALL_DIR} ${INCLUDE_INSTALL_DIR}
${CGAL_INCLUDE_DIR}/../auxiliary/gmp/include
) )
# Set MPFR_FIND_VERSION to 1.0.0 if no minimum version is specified # Set MPFR_FIND_VERSION to 1.0.0 if no minimum version is specified
if(NOT MPFR_FIND_VERSION) if(NOT MPFR_FIND_VERSION)
if(NOT MPFR_FIND_VERSION_MAJOR) if(NOT MPFR_FIND_VERSION_MAJOR)
set(MPFR_FIND_VERSION_MAJOR 1) set(MPFR_FIND_VERSION_MAJOR 1)
...@@ -59,6 +61,7 @@ set(MPFR_PATCHLEVEL_VERSION "${CMAKE_MATCH_1}") ...@@ -59,6 +61,7 @@ set(MPFR_PATCHLEVEL_VERSION "${CMAKE_MATCH_1}")
set(MPFR_VERSION ${MPFR_MAJOR_VERSION}.${MPFR_MINOR_VERSION}.${MPFR_PATCHLEVEL_VERSION}) set(MPFR_VERSION ${MPFR_MAJOR_VERSION}.${MPFR_MINOR_VERSION}.${MPFR_PATCHLEVEL_VERSION})
# Check whether found version exceeds minimum version # Check whether found version exceeds minimum version
if(${MPFR_VERSION} VERSION_LESS ${MPFR_FIND_VERSION}) if(${MPFR_VERSION} VERSION_LESS ${MPFR_FIND_VERSION})
...@@ -72,8 +75,7 @@ endif(${MPFR_VERSION} VERSION_LESS ${MPFR_FIND_VERSION}) ...@@ -72,8 +75,7 @@ endif(${MPFR_VERSION} VERSION_LESS ${MPFR_FIND_VERSION})
endif(MPFR_INCLUDES) endif(MPFR_INCLUDES)
# Set MPFR_LIBRARIES # Set MPFR_LIBRARIES
find_library(MPFR_LIBRARIES mpfr libmpfr-4 PATHS $ENV{GMPDIR} ${LIB_INSTALL_DIR} ${CGAL_INCLUDE_DIR}/../auxiliary/gmp/lib)
find_library(MPFR_LIBRARIES mpfr PATHS $ENV{GMPDIR} ${LIB_INSTALL_DIR})
# Epilogue # Epilogue
......
...@@ -33,6 +33,7 @@ endif() ...@@ -33,6 +33,7 @@ endif()
find_path(MUMPS_INCLUDE_DIR NAMES dmumps_c.h find_path(MUMPS_INCLUDE_DIR NAMES dmumps_c.h
PATHS "$ENV{IPOPT_HOME}/ThirdParty/Mumps/MUMPS/include/" PATHS "$ENV{IPOPT_HOME}/ThirdParty/Mumps/MUMPS/include/"
"/usr/include/" "/usr/include/"
"${VS_SEARCH_PATH}Ipopt-3.12.9/include/mumps"
"${VS_SEARCH_PATH}Ipopt-3.12.4/Ipopt/MSVisualStudio/v8-ifort/installed/include/mumps/include/" "${VS_SEARCH_PATH}Ipopt-3.12.4/Ipopt/MSVisualStudio/v8-ifort/installed/include/mumps/include/"
) )
...@@ -40,6 +41,7 @@ find_library( MUMPS_LIBRARY_DEBUG ...@@ -40,6 +41,7 @@ find_library( MUMPS_LIBRARY_DEBUG
dmumpsd coinmumpsd coinmumpscd dmumpsd coinmumpsd coinmumpscd
PATHS "$ENV{IPOPT_HOME}/lib/" PATHS "$ENV{IPOPT_HOME}/lib/"
"/usr/lib" "/usr/lib"
"${VS_SEARCH_PATH}Ipopt-3.12.9/lib"
"${VS_SEARCH_PATH}Ipopt-3.12.4/Ipopt/MSVisualStudio/v8-ifort/installed/lib" "${VS_SEARCH_PATH}Ipopt-3.12.4/Ipopt/MSVisualStudio/v8-ifort/installed/lib"
) )
...@@ -47,6 +49,7 @@ find_library( MUMPS_LIBRARY_RELEASE ...@@ -47,6 +49,7 @@ find_library( MUMPS_LIBRARY_RELEASE
dmumps coinmumps coinmumpsc dmumps coinmumps coinmumpsc
PATHS "$ENV{IPOPT_HOME}/lib/" PATHS "$ENV{IPOPT_HOME}/lib/"
"/usr/lib" "/usr/lib"
"${VS_SEARCH_PATH}Ipopt-3.12.9/lib"
"${VS_SEARCH_PATH}Ipopt-3.12.4/Ipopt/MSVisualStudio/v8-ifort/installed/lib" "${VS_SEARCH_PATH}Ipopt-3.12.4/Ipopt/MSVisualStudio/v8-ifort/installed/lib"
) )
...@@ -62,4 +65,4 @@ include(FindPackageHandleStandardArgs) ...@@ -62,4 +65,4 @@ include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(MUMPS DEFAULT_MSG find_package_handle_standard_args(MUMPS DEFAULT_MSG
MUMPS_LIBRARY MUMPS_INCLUDE_DIR) MUMPS_LIBRARY MUMPS_INCLUDE_DIR)
mark_as_advanced(MUMPS_INCLUDE_DIR MUMPS_LIBRARY ) mark_as_advanced(MUMPS_INCLUDE_DIR MUMPS_LIBRARY )
\ No newline at end of file
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