Skip to content

Commit

Permalink
cmake: add conditional check for whether we are building boost
Browse files Browse the repository at this point in the history
  • Loading branch information
LER0ever committed Oct 17, 2018
1 parent f53fc48 commit a1952e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Expand Up @@ -107,7 +107,9 @@ if(BUILD_RTLIB)
add_dependencies(dyninstAPI-static DyninstRT)
endif()
endif()
add_dependencies(DyninstRT boost)
if(TARGET boost)
add_dependencies(DyninstRT boost)
endif()

install(SCRIPT "${RT_BINARY_DIR}/cmake_install.cmake")

Expand Down
4 changes: 3 additions & 1 deletion cmake/shared.cmake
Expand Up @@ -36,7 +36,9 @@ set(ALL_DYNINST_TARGETS "" CACHE INTERNAL "")
function (dyninst_library target)
add_library (${target} ${SRC_LIST})
# add boost as a universal dependencies for all sub libraries
add_dependencies (${target} boost)
if(TARGET boost)
add_dependencies (${target} boost)
endif()
target_link_private_libraries (${target} ${ARGN})
FILE (GLOB headers "h/*.h" "${CMAKE_CURRENT_BINARY_DIR}/h/*.h")
set (ACTUAL_TARGETS ${target})
Expand Down

0 comments on commit a1952e3

Please sign in to comment.