Commit 1750ce73 authored by EYRAUD-DUBOIS Lionel's avatar EYRAUD-DUBOIS Lionel

Try more genericity

parent b4946261
...@@ -92,7 +92,9 @@ else() ...@@ -92,7 +92,9 @@ else()
set(CPLEX_ROOT_DIR "" CACHE PATH "CPLEX root directory.") set(CPLEX_ROOT_DIR "" CACHE PATH "CPLEX root directory.")
set(CPLEX_WIN_PLATFORM "") set(CPLEX_WIN_PLATFORM "")
string(TOLOWER ${CMAKE_SYSTEM_NAME} CPLEX_SYSTEM_NAME_LOWER)
set(CPLEX_PLATFORM "${CMAKE_SYSTEM_PROCESSOR}_${CPLEX_SYSTEM_NAME_LOWER}")
endif() endif()
message(STATUS "cplex root dir: ${CPLEX_ROOT_DIR}") message(STATUS "cplex root dir: ${CPLEX_ROOT_DIR}")
...@@ -118,6 +120,7 @@ FIND_PATH(CPLEX_CONCERT_INCLUDE_DIR ...@@ -118,6 +120,7 @@ FIND_PATH(CPLEX_CONCERT_INCLUDE_DIR
FIND_LIBRARY(CPLEX_LIBRARY FIND_LIBRARY(CPLEX_LIBRARY
NAMES cplex${CPLEX_WIN_VERSION} cplex NAMES cplex${CPLEX_WIN_VERSION} cplex
HINTS ${CPLEX_ROOT_DIR}/cplex/lib/${CPLEX_WIN_PLATFORM} #windows HINTS ${CPLEX_ROOT_DIR}/cplex/lib/${CPLEX_WIN_PLATFORM} #windows
${CPLEX_ROOT_DIR}/cplex/lib/${CPLEX_PLATFORM}/static_pic #generic
${CPLEX_ROOT_DIR}/cplex/lib/x86-64_debian4.0_4.1/static_pic #unix ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_debian4.0_4.1/static_pic #unix
${CPLEX_ROOT_DIR}/cplex/lib/x86-64_sles10_4.1/static_pic #unix ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_sles10_4.1/static_pic #unix
${CPLEX_ROOT_DIR}/cplex/lib/x86-64_linux/static_pic #linux (ubuntu) ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_linux/static_pic #linux (ubuntu)
...@@ -131,6 +134,7 @@ message(STATUS "CPLEX Library: ${CPLEX_LIBRARY}") ...@@ -131,6 +134,7 @@ message(STATUS "CPLEX Library: ${CPLEX_LIBRARY}")
FIND_LIBRARY(CPLEX_ILOCPLEX_LIBRARY FIND_LIBRARY(CPLEX_ILOCPLEX_LIBRARY
ilocplex ilocplex
HINTS ${CPLEX_ROOT_DIR}/cplex/lib/${CPLEX_WIN_PLATFORM} #windows HINTS ${CPLEX_ROOT_DIR}/cplex/lib/${CPLEX_WIN_PLATFORM} #windows
${CPLEX_ROOT_DIR}/cplex/lib/${CPLEX_PLATFORM}/static_pic #generic
${CPLEX_ROOT_DIR}/cplex/lib/x86-64_debian4.0_4.1/static_pic #unix ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_debian4.0_4.1/static_pic #unix
${CPLEX_ROOT_DIR}/cplex/lib/x86-64_sles10_4.1/static_pic #unix ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_sles10_4.1/static_pic #unix
${CPLEX_ROOT_DIR}/cplex/lib/x86-64_osx/static_pic #osx ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_osx/static_pic #osx
...@@ -144,6 +148,7 @@ message(STATUS "ILOCPLEX Library: ${CPLEX_ILOCPLEX_LIBRARY}") ...@@ -144,6 +148,7 @@ message(STATUS "ILOCPLEX Library: ${CPLEX_ILOCPLEX_LIBRARY}")
FIND_LIBRARY(CPLEX_CONCERT_LIBRARY FIND_LIBRARY(CPLEX_CONCERT_LIBRARY
concert concert
HINTS ${CPLEX_ROOT_DIR}/concert/lib/${CPLEX_WIN_PLATFORM} #windows HINTS ${CPLEX_ROOT_DIR}/concert/lib/${CPLEX_WIN_PLATFORM} #windows
${CPLEX_ROOT_DIR}/concert/lib/${CPLEX_PLATFORM}/static_pic #generic
${CPLEX_ROOT_DIR}/concert/lib/x86-64_debian4.0_4.1/static_pic #unix ${CPLEX_ROOT_DIR}/concert/lib/x86-64_debian4.0_4.1/static_pic #unix
${CPLEX_ROOT_DIR}/concert/lib/x86-64_sles10_4.1/static_pic #unix ${CPLEX_ROOT_DIR}/concert/lib/x86-64_sles10_4.1/static_pic #unix
${CPLEX_ROOT_DIR}/concert/lib/x86-64_osx/static_pic #osx ${CPLEX_ROOT_DIR}/concert/lib/x86-64_osx/static_pic #osx
...@@ -162,10 +167,13 @@ if(WIN32) ...@@ -162,10 +167,13 @@ if(WIN32)
else() else()
FIND_PATH(CPLEX_BIN_DIR FIND_PATH(CPLEX_BIN_DIR
cplex cplex
HINTS ${CPLEX_ROOT_DIR}/cplex/bin/x86-64_sles10_4.1 #unix HINTS ${CPLEX_ROOT_DIR}/cplex/bin/x86-64_sles10_4.1 #unix
${CPLEX_ROOT_DIR}/cplex/bin/${CPLEX_PLATFORM}/static_pic #generic
${CPLEX_ROOT_DIR}/cplex/bin/x86-64_debian4.0_4.1 #unix ${CPLEX_ROOT_DIR}/cplex/bin/x86-64_debian4.0_4.1 #unix
${CPLEX_ROOT_DIR}/cplex/bin/x86-64_osx #osx ${CPLEX_ROOT_DIR}/cplex/bin/x86-64_osx #osx
${CPLEX_ROOT_DIR}/cplex/bin/x86-64_darwin #osx ${CPLEX_ROOT_DIR}/cplex/bin/x86-64_darwin #osx
${CPLEX_ROOT_DIR}/cplex/bin/x86-64_linux #linux (ubuntu)
ENV LIBRARY_PATH ENV LIBRARY_PATH
ENV LD_LIBRARY_PATH ENV LD_LIBRARY_PATH
) )
......
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