CMakeLists: Fixup boost
* boost is part of the public interface. * Consider boost a system library so warnings from boost do not cause a build failure. * If the parent project defines boost, use that.
This commit is contained in:
parent
4f8675083c
commit
0af1e7723d
3 changed files with 9 additions and 9 deletions
|
@ -17,6 +17,6 @@ matrix:
|
|||
script: ./.travis/build-x86_64-linux.sh
|
||||
- os: osx
|
||||
sudo: false
|
||||
osx_image: xcode7.3
|
||||
osx_image: xcode9.2
|
||||
install: ./.travis/deps-x86_64-macos.sh
|
||||
script: ./.travis/build-x86_64-macos.sh
|
||||
|
|
|
@ -104,15 +104,14 @@ endif()
|
|||
message(STATUS "Target architecture: ${ARCHITECTURE}")
|
||||
|
||||
# Include Boost
|
||||
if(DYNARMIC_USE_SYSTEM_BOOST)
|
||||
if (NOT TARGET boost)
|
||||
if (NOT Boost_INCLUDE_DIRS)
|
||||
find_package(Boost 1.57.0 REQUIRED)
|
||||
else()
|
||||
if(NOT Boost_INCLUDE_DIRS)
|
||||
message(FATAL_ERROR "Please provide a path to a boost installation using Boost_INCLUDE_DIRS")
|
||||
endif()
|
||||
add_library(boost INTERFACE IMPORTED)
|
||||
set_property(TARGET boost PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS})
|
||||
set_property(TARGET boost PROPERTY INTERFACE_SYSTEM_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS})
|
||||
endif()
|
||||
add_library(boost INTERFACE IMPORTED)
|
||||
set_property(TARGET boost PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS})
|
||||
|
||||
# Enable unit-testing.
|
||||
enable_testing(true)
|
||||
|
|
|
@ -112,8 +112,9 @@ target_include_directories(dynarmic
|
|||
PRIVATE .)
|
||||
target_compile_options(dynarmic PRIVATE ${DYNARMIC_CXX_FLAGS})
|
||||
target_link_libraries(dynarmic
|
||||
PRIVATE
|
||||
PUBLIC
|
||||
boost
|
||||
PRIVATE
|
||||
fmt::fmt
|
||||
xbyak
|
||||
$<$<BOOL:DYNARMIC_USE_LLVM>:${llvm_libs}>
|
||||
|
|
Loading…
Reference in a new issue