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 ()
if (IPOPT_FOUND AND MUMPS_FOUND)
list( APPEND COMISO_INCLUDE_DIRECTORIES ${IPOPT_INCLUDE_DIR} )
list( APPEND COMISO_LINK_DIRECTORIES ${IPOPT_LIBRARY_DIR} )
list( APPEND COMISO_LINK_LIBRARIES ${IPOPT_LIBRARY} )
list( APPEND COMISO_LINK_LIBRARIES ${IPOPT_LIBRARIES} )
endif ()
#find_package(LAPACK)
......
......@@ -53,7 +53,7 @@ ELSE( WIN32 )
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
NAMES libhsl.so
libhsl.dylib
......@@ -61,6 +61,13 @@ ELSE( WIN32 )
"$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( NOT IPOPT_FIND_QUIETLY )
message ( "IPOPT_HSL_LIBRARY_DIR found at ${IPOPT_HSL_LIBRARY_DIR} ")
......@@ -73,8 +80,12 @@ ELSE( WIN32 )
set(IPOPT_INCLUDE_DIRS "${IPOPT_INCLUDE_DIR}" )
set(IPOPT_LIBRARIES "${IPOPT_LIBRARY}" )
IF(IPOPT_HSL_LIBRARY)
LIST( APPEND IPOPT_LIBRARIES "${IPOPT_HSL_LIBRARY}")
ENDIF(IPOPT_HSL_LIBRARY)
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
find_package_handle_standard_args(IPOPT DEFAULT_MSG
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