Commit c53ded35 authored by David Bommes's avatar David Bommes

fixed issues with static linking of HSL

git-svn-id: http://www.openflipper.org/svnrepo/CoMISo/trunk@239 1355f012-dd97-4b2f-ae87-10fa9f823a57
parent 8922cf50
...@@ -14,7 +14,7 @@ endif () ...@@ -14,7 +14,7 @@ endif ()
if (IPOPT_FOUND AND MUMPS_FOUND) if (IPOPT_FOUND AND MUMPS_FOUND)
list( APPEND COMISO_INCLUDE_DIRECTORIES ${IPOPT_INCLUDE_DIR} ) list( APPEND COMISO_INCLUDE_DIRECTORIES ${IPOPT_INCLUDE_DIR} )
list( APPEND COMISO_LINK_DIRECTORIES ${IPOPT_LIBRARY_DIR} ) list( APPEND COMISO_LINK_DIRECTORIES ${IPOPT_LIBRARY_DIR} )
list( APPEND COMISO_LINK_LIBRARIES ${IPOPT_LIBRARY} ) list( APPEND COMISO_LINK_LIBRARIES ${IPOPT_LIBRARIES} )
endif () endif ()
#find_package(LAPACK) #find_package(LAPACK)
......
...@@ -53,13 +53,20 @@ ELSE( WIN32 ) ...@@ -53,13 +53,20 @@ ELSE( WIN32 )
add_definitions( -DHAVE_CSTDDEF ) add_definitions( -DHAVE_CSTDDEF )
# set optional path to HSL Solver # 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
libhsl.dylib libhsl.dylib
PATHS "$ENV{IPOPT_HSL_LIBRARY_PATH}" PATHS "$ENV{IPOPT_HSL_LIBRARY_PATH}"
"$ENV{HOME}/opt/HSL/lib" "$ENV{HOME}/opt/HSL/lib"
) )
# find HSL library for fixed linking of solvers
find_library( IPOPT_HSL_LIBRARY
coinhsl
PATHS "$ENV{IPOPT_HOME}/lib"
"/usr/lib" )
IF( IPOPT_HSL_LIBRARY_DIR) IF( IPOPT_HSL_LIBRARY_DIR)
IF( NOT IPOPT_FIND_QUIETLY ) IF( NOT IPOPT_FIND_QUIETLY )
...@@ -72,9 +79,13 @@ ELSE( WIN32 ) ...@@ -72,9 +79,13 @@ ELSE( WIN32 )
set(IPOPT_INCLUDE_DIRS "${IPOPT_INCLUDE_DIR}" ) set(IPOPT_INCLUDE_DIRS "${IPOPT_INCLUDE_DIR}" )
set(IPOPT_LIBRARIES "${IPOPT_LIBRARY}" ) set(IPOPT_LIBRARIES "${IPOPT_LIBRARY}" )
IF(IPOPT_HSL_LIBRARY)
LIST( APPEND IPOPT_LIBRARIES "${IPOPT_HSL_LIBRARY}")
ENDIF(IPOPT_HSL_LIBRARY)
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBCPLEX_FOUND to TRUE # handle the QUIETLY and REQUIRED arguments and set LIBIPOPT_FOUND to TRUE
# if all listed variables are TRUE # if all listed variables are TRUE
find_package_handle_standard_args(IPOPT DEFAULT_MSG find_package_handle_standard_args(IPOPT DEFAULT_MSG
IPOPT_LIBRARY IPOPT_INCLUDE_DIR) IPOPT_LIBRARY IPOPT_INCLUDE_DIR)
......
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