mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-12-16 18:46:35 +00:00
CMake: Use IMPORTED target for Boost
This commit is contained in:
parent
4660bc1c78
commit
0f563111a2
@ -1,5 +1,5 @@
|
||||
# CMake 3.5 required for support for IMPORTED find_package libraries
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
# CMake 3.6 required for FindBoost to define IMPORTED libs properly on unknown Boost versions
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMakeModules)
|
||||
|
||||
function(download_bundled_external remote_path lib_name prefix_var)
|
||||
@ -135,12 +135,14 @@ if (NOT PNG_FOUND)
|
||||
message(STATUS "libpng not found. Some debugging features have been disabled.")
|
||||
endif()
|
||||
|
||||
find_package(Boost 1.57.0 QUIET)
|
||||
find_package(Boost 1.63.0 QUIET)
|
||||
if (NOT Boost_FOUND)
|
||||
message(STATUS "Boost 1.57.0 or newer not found, falling back to externals")
|
||||
set(Boost_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/externals/boost")
|
||||
message(STATUS "Boost 1.63.0 or newer not found, falling back to externals")
|
||||
|
||||
set(BOOST_ROOT "${CMAKE_SOURCE_DIR}/externals/boost")
|
||||
set(Boost_NO_SYSTEM_PATHS OFF)
|
||||
find_package(Boost QUIET REQUIRED)
|
||||
endif()
|
||||
include_directories(${Boost_INCLUDE_DIR})
|
||||
|
||||
# Include bundled CMake modules
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/externals/cmake-modules")
|
||||
|
@ -92,7 +92,7 @@ else()
|
||||
add_executable(citra-qt ${SRCS} ${HEADERS} ${UI_HDRS})
|
||||
endif()
|
||||
target_link_libraries(citra-qt PRIVATE audio_core common core input_common video_core)
|
||||
target_link_libraries(citra-qt PRIVATE ${OPENGL_gl_LIBRARY} ${CITRA_QT_LIBS} glad)
|
||||
target_link_libraries(citra-qt PRIVATE ${OPENGL_gl_LIBRARY} ${CITRA_QT_LIBS} Boost::boost glad)
|
||||
target_link_libraries(citra-qt PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
|
@ -95,6 +95,7 @@ endif()
|
||||
create_directory_groups(${SRCS} ${HEADERS})
|
||||
|
||||
add_library(common STATIC ${SRCS} ${HEADERS})
|
||||
target_link_libraries(common PUBLIC Boost::boost)
|
||||
if (ARCHITECTURE_x86_64)
|
||||
target_link_libraries(common PRIVATE xbyak)
|
||||
endif()
|
||||
|
@ -381,4 +381,4 @@ create_directory_groups(${SRCS} ${HEADERS})
|
||||
|
||||
add_library(core STATIC ${SRCS} ${HEADERS})
|
||||
target_link_libraries(core PUBLIC common PRIVATE audio_core video_core)
|
||||
target_link_libraries(core PRIVATE cryptopp dynarmic)
|
||||
target_link_libraries(core PUBLIC Boost::boost PRIVATE cryptopp dynarmic)
|
||||
|
Loading…
Reference in New Issue
Block a user