diff --git a/.travis.yml b/.travis.yml index 24db30d6..2c19286d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a3d63fb..61be232f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,15 +104,14 @@ endif() message(STATUS "Target architecture: ${ARCHITECTURE}") # Include Boost -if(DYNARMIC_USE_SYSTEM_BOOST) - 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") +if (NOT TARGET boost) + if (NOT Boost_INCLUDE_DIRS) + find_package(Boost 1.57.0 REQUIRED) 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) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 29994a85..8fbd2dcf 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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 $<$:${llvm_libs}>