Commit 18c60c55 authored by Max Lyon's avatar Max Lyon
Browse files

improve some finders

parent 1c054780
...@@ -48,8 +48,8 @@ if (WIN32) ...@@ -48,8 +48,8 @@ if (WIN32)
"${VS_SEARCH_PATH}Ipopt-3.12.9/include/coin" "${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"
${IPOPT_DIR}/include ${IPOPT_DIR}/include
) )
IF(IPOPT_INCLUDE_DIR) IF(IPOPT_INCLUDE_DIR)
...@@ -83,21 +83,24 @@ if (WIN32) ...@@ -83,21 +83,24 @@ if (WIN32)
ENDIF(IPOPT_INCLUDE_DIR) ENDIF(IPOPT_INCLUDE_DIR)
ELSE( WIN32 ) ELSE( WIN32 )
find_path(IPOPT_INCLUDE_DIR NAMES IpNLP.hpp find_path(IPOPT_INCLUDE_DIR NAMES IpNLP.hpp
HINTS "$ENV{IPOPT_HOME}/include/coin" PATHS "$ENV{IPOPT_HOME}/include/coin"
"/usr/include/coin" "/usr/include/coin"
"~/sw/Ipopt-3.12.4-installed/include/coin"
) )
find_library( IPOPT_LIBRARY find_library( IPOPT_LIBRARY
ipopt ipopt
HINTS "$ENV{IPOPT_HOME}/lib" HINTS "$ENV{IPOPT_HOME}/lib"
"/usr/lib" ) PATHS
"/usr/lib"
"~/sw/Ipopt-3.12.4-installed/lib"
)
#wrong config under Debian workaround #wrong config under Debian workaround
add_definitions( -DHAVE_CSTDDEF ) add_definitions( -DHAVE_CSTDDEF )
# set optional path to HSL Solver for dynamic usage # set optional path to HSL Solver for dynamic usage
find_path(IPOPT_HSL_LIBRARY_DIR find_path(IPOPT_HSL_LIBRARY_DIR
NAMES libhsl.so NAMES libhsl.so
...@@ -106,13 +109,13 @@ ELSE( WIN32 ) ...@@ -106,13 +109,13 @@ ELSE( WIN32 )
"$ENV{HOME}/opt/HSL/lib" "$ENV{HOME}/opt/HSL/lib"
) )
# find HSL library for fixed linking of solvers # find HSL library for fixed linking of solvers
find_library( IPOPT_HSL_LIBRARY find_library( IPOPT_HSL_LIBRARY
NAMES hsl coinhsl coinhsl hsl
HINTS "$ENV{IPOPT_HSL_LIBRARY_PATH}" HINTS "$ENV{IPOPT_HSL_LIBRARY_PATH}"
"$ENV{IPOPT_HOME}/lib" "$ENV{IPOPT_HOME}/lib"
"/usr/lib" ) PATHS "/usr/lib" )
IF( IPOPT_HSL_LIBRARY_DIR) IF( IPOPT_HSL_LIBRARY_DIR)
IF( NOT IPOPT_FIND_QUIETLY ) IF( NOT IPOPT_FIND_QUIETLY )
...@@ -122,7 +125,7 @@ ELSE( WIN32 ) ...@@ -122,7 +125,7 @@ ELSE( WIN32 )
LIST( APPEND IPOPT_LIBRARY_DIRS "${IPOPT_HSL_LIBRARY_DIR}") LIST( APPEND IPOPT_LIBRARY_DIRS "${IPOPT_HSL_LIBRARY_DIR}")
ENDIF(IPOPT_HSL_LIBRARY_DIR) ENDIF(IPOPT_HSL_LIBRARY_DIR)
set(IPOPT_INCLUDE_DIRS "${IPOPT_INCLUDE_DIR}" ) set(IPOPT_INCLUDE_DIRS "${IPOPT_INCLUDE_DIR}" )
set(IPOPT_LIBRARIES "${IPOPT_LIBRARY}" ) set(IPOPT_LIBRARIES "${IPOPT_LIBRARY}" )
......
...@@ -36,30 +36,31 @@ endif() ...@@ -36,30 +36,31 @@ endif()
find_path(METIS_INCLUDE_DIR NAMES metis.h find_path(METIS_INCLUDE_DIR NAMES metis.h
PATHS "$ENV{IPOPT_HOME}/ThirdParty/Metis/metis-4.0/Lib/" HINTS "$ENV{IPOPT_HOME}/include/coin/ThirdParty"
"/usr/include/" "$ENV{IPOPT_HOME}/ThirdParty/Metis/metis-4.0/Lib/"
PATHS "/usr/include/"
"/usr/include/metis" "/usr/include/metis"
"/opt/local/include" "/opt/local/include"
"/opt/local/include/metis" "/opt/local/include/metis"
"${VS_SEARCH_PATH}Ipopt-3.12.9/include/metis" "${VS_SEARCH_PATH}Ipopt-3.12.9/include/metis"
"${VS_SEARCH_PATH}Ipopt-3.12.4/Ipopt/MSVisualStudio/v8-ifort/installed/include/metis" "${VS_SEARCH_PATH}Ipopt-3.12.4/Ipopt/MSVisualStudio/v8-ifort/installed/include/metis"
) )
find_library( METIS_LIBRARY_RELEASE find_library( METIS_LIBRARY_RELEASE
metis coinmetis coinmetis metis
PATHS "$ENV{IPOPT_HOME}/lib/" HINTS "$ENV{IPOPT_HOME}/lib/"
"/usr/lib" PATHS "/usr/lib"
"/opt/local/lib" "/opt/local/lib"
"${VS_SEARCH_PATH}Ipopt-3.12.9/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"
) )
find_library( METIS_LIBRARY_DEBUG find_library( METIS_LIBRARY_DEBUG
metisd coinmetisd coinmetisd metisd
PATHS "$ENV{IPOPT_HOME}/lib/" HINTS "$ENV{IPOPT_HOME}/lib/"
"/usr/lib" PATHS "/usr/lib"
"/opt/local/lib" "/opt/local/lib"
"${VS_SEARCH_PATH}Ipopt-3.12.9/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"
) )
......
...@@ -35,27 +35,28 @@ elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 15.*" ) ...@@ -35,27 +35,28 @@ elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 15.*" )
endif() 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/" HINTS "$ENV{IPOPT_HOME}/include/coin/ThirdParty/"
"/usr/include/" "$ENV{IPOPT_HOME}/ThirdParty/Mumps/MUMPS/include/"
"${VS_SEARCH_PATH}Ipopt-3.12.9/include/mumps" PATHS "/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" "${VS_SEARCH_PATH}Ipopt-3.12.4/Ipopt/MSVisualStudio/v8-ifort/installed/include/mumps"
) )
find_library( MUMPS_LIBRARY_DEBUG find_library( MUMPS_LIBRARY_DEBUG
dmumpsd coinmumpsd coinmumpscd dmumpsd coinmumpsd coinmumpscd
PATHS "$ENV{IPOPT_HOME}/lib/" HINTS "$ENV{IPOPT_HOME}/lib/"
"/usr/lib" PATHS "/usr/lib"
"${VS_SEARCH_PATH}Ipopt-3.12.9/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"
) )
find_library( MUMPS_LIBRARY_RELEASE find_library( MUMPS_LIBRARY_RELEASE
dmumps coinmumps coinmumpsc coinmumps dmumps coinmumpsc
PATHS "$ENV{IPOPT_HOME}/lib/" HINTS "$ENV{IPOPT_HOME}/lib/"
"/usr/lib" PATHS "/usr/lib"
"${VS_SEARCH_PATH}Ipopt-3.12.9/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"
) )
include(SelectLibraryConfigurations) include(SelectLibraryConfigurations)
select_library_configurations( MUMPS ) select_library_configurations( MUMPS )
......
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