Skip to content

Commit

Permalink
find boost static library first
Browse files Browse the repository at this point in the history
  • Loading branch information
limbo018 committed Oct 27, 2019
1 parent 408679d commit 5afccad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,14 @@ set(LIMBO_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/thirdparty/Limbo)
message("-- LIMBO_BINARY_DIR ${LIMBO_BINARY_DIR}")

find_package(ZLIB REQUIRED)
find_package(Boost 1.55.0 REQUIRED COMPONENTS chrono timer graph regex)
# first try to find static libraries, then try to find dynamic ones
set(Boost_USE_STATIC_LIBS ON)
find_package(Boost 1.55.0 COMPONENTS chrono timer graph)
if (NOT Boost_FOUND)
set(Boost_USE_STATIC_LIBS OFF)
find_package(Boost 1.55.0 REQUIRED COMPONENTS chrono timer graph)
endif (NOT Boost_FOUND)
message("-- Boost_INCLUDE_DIRS = ${Boost_INCLUDE_DIRS}")
find_package(Gurobi)

add_subdirectory(thirdparty)
Expand Down

0 comments on commit 5afccad

Please sign in to comment.