Skip to content

Commit

Permalink
Explicitly link Symtab against Boost libs
Browse files Browse the repository at this point in the history
  • Loading branch information
wrwilliams committed Oct 31, 2016
1 parent 0124a7f commit 1ae7788
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -220,6 +220,6 @@ if(UNIX)
endif()
endif()

if(NOT Boost_FOUND)
if(TARGET boost)
add_dependencies(common boost)
endif()
2 changes: 1 addition & 1 deletion appveyor.yml
@@ -1,7 +1,7 @@
build:
parallel: true
project: Dyninst.sln
verbosity: detailed
verbosity: normal

clone_depth: 5

Expand Down
4 changes: 2 additions & 2 deletions cmake/packages.cmake
Expand Up @@ -166,11 +166,11 @@ if(NOT Boost_FOUND)
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ${BOOST_BOOTSTRAP} --prefix=${CMAKE_INSTALL_PREFIX}
BUILD_COMMAND ${BOOST_BUILD} ${BOOST_ARGS} stage
INSTALL_COMMAND ${BOOST_BUILD} ${BOOST_ARGS} install
INSTALL_COMMAND ""
)
set(Boost_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/${BOOST_BASE})
set(Boost_LIBRARY_DIRS ${CMAKE_BINARY_DIR}/${BOOST_BASE}/stage/lib)
set(Boost_LIBRARIES -lboost_system -lboost_thread)
set(Boost_LIBRARIES boost_thread boost_system)
endif()

link_directories ( ${Boost_LIBRARY_DIRS} )
Expand Down
2 changes: 1 addition & 1 deletion common/CMakeLists.txt
Expand Up @@ -110,12 +110,12 @@ if (IBERTY_FOUND)
set(DEPS ${IBERTY_LIBRARIES})
endif()

list(APPEND DEPS ${Boost_LIBRARIES})

dyninst_library(common ${DEPS})
if(PLATFORM MATCHES nt OR PLATFORM MATCHES windows)
target_link_private_libraries(common Psapi WS2_32 dbghelp)
endif()
target_link_private_libraries(common ${Boost_LIBRARIES})


IF (USE_COTIRE)
Expand Down
5 changes: 3 additions & 2 deletions symtabAPI/CMakeLists.txt
Expand Up @@ -100,15 +100,16 @@ ADD_DEFINITIONS(-DSYMTAB_LIB)
set (DEPS common)

if(UNIX)
set (DEPS ${DEPS}
list (APPEND DEPS
dynElf ${LIBELF_LIBRARIES}
dynDwarf ${LIBDWARF_LIBRARIES}
)
else()
set (DEPS ${DEPS} dbghelp)
list (APPEND DEPS dbghelp)
endif()

dyninst_library(symtabAPI ${DEPS})
target_link_private_libraries(symtabAPI ${Boost_LIBRARIES})

if (USE_COTIRE)
cotire(symtabAPI)
Expand Down

0 comments on commit 1ae7788

Please sign in to comment.