Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue1122 again #196

Merged
merged 2 commits into from
Oct 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/search/cmake/FindCplex.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@
set(IMPORTED_CONFIGURATIONS "Debug" "Release")
set(HINT_PATHS ${cplex_DIR} $ENV{cplex_DIR})

add_library(cplex::cplex IMPORTED UNKNOWN)
if(WIN32)
# On Windows we have to declare the library as SHARED to correctly
# communicate the location of the dll and impllib files.
add_library(cplex::cplex IMPORTED SHARED)
else()
# On Linux, the CPLEX installer sometimes does not provide dynamic
# libraries. If they are absent, we fall back to static ones further down,
# hence we mark the type unknown here.
add_library(cplex::cplex IMPORTED UNKNOWN)
FlorianPommerening marked this conversation as resolved.
Show resolved Hide resolved
endif()
set_target_properties(cplex::cplex PROPERTIES
IMPORTED_CONFIGURATIONS "${IMPORTED_CONFIGURATIONS}"
)
Expand Down