Skip to content

Commit 7c56830

Browse files
committed
Fixed scip dependency path coding in gcg-config.cmake
1 parent cad3973 commit 7c56830

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

gcg-config.cmake.in

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ if(NOT TARGET libgcg)
22
include("${CMAKE_CURRENT_LIST_DIR}/gcg-targets.cmake")
33
endif()
44

5-
set(SCIP_NEEDED "@SCIP_FOUND@")
6-
7-
if(SCIP_NEEDED)
5+
if(@SCIP_NEEDED@)
86
set(SCIP_DIR "@CONF_SCIP_DIR@")
97
find_package(SCIP QUIET CONFIG)
108
endif()

src/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -365,9 +365,11 @@ setLibProperties(libgcg "gcg")
365365
target_link_libraries(libgcg PRIVATE ${SCIP_LIBRARIES} ${SYM_LIBRARIES})
366366

367367
if(SHARED)
368+
set(SCIP_NEEDED 0)
368369
target_link_libraries(libgcg PRIVATE ${SCIP_PIC_LIBRARIES} ${SYM_PIC_LIBRARIES} ${CLIQUER_PIC_LIBRARIES} ${CPLEX_PIC_LIBRARIES} ${GSL_PIC_LIBRARIES})
369370
add_executable(gcg main.c ${gcgsources})
370371
else()
372+
set(SCIP_NEEDED ${SCIP_FOUND})
371373
target_link_libraries(libgcg PRIVATE ${SCIP_LIBRARIES} ${SYM_LIBRARIES} ${CLIQUER_LIBRARIES} ${CPLEX_LIBRARIES} ${GSL_LIBRARIES})
372374
add_executable(gcg main.c)
373375
target_link_libraries(gcg libgcg)

0 commit comments

Comments
 (0)