aboutsummaryrefslogtreecommitdiff
path: root/src/common/CMakeLists.txt
diff options
context:
space:
mode:
authorcrueter <crueter@eden-emu.dev>2025-08-14 20:30:30 +0200
committercrueter <crueter@eden-emu.dev>2025-08-14 20:30:30 +0200
commit3e55dc6352b786532230ceb21754179917541adf (patch)
tree2d47b76e1fdeb1061f338daedb38865080a8c9fc /src/common/CMakeLists.txt
parentc36cc0d3ee14bc35cf1aa5d38b3f4fe23da8ff9f (diff)
[cmake] refactor: CPM over vcpkg (#250)
Completely replaces vcpkg with CPM for all "system" dependencies. Primarily needed for Android and Windows. Also uses my OpenSSL CI for those two platforms. In theory, improves configure and build time by a LOT and makes things much easier to manage Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/250 Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Diffstat (limited to 'src/common/CMakeLists.txt')
-rw-r--r--src/common/CMakeLists.txt21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 580f984ad8..e9aed1d7af 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -261,9 +261,24 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
)
endif()
-target_link_libraries(common PUBLIC Boost::headers fmt::fmt
- stb::headers Threads::Threads)
-target_link_libraries(common PRIVATE lz4::lz4 zstd::zstd LLVM::Demangle)
+if (BOOST_NO_HEADERS)
+ target_link_libraries(common PUBLIC Boost::algorithm Boost::icl Boost::pool)
+else()
+ target_link_libraries(common PUBLIC Boost::headers)
+endif()
+
+if (lz4_ADDED)
+ target_include_directories(common PRIVATE ${lz4_SOURCE_DIR}/lib)
+endif()
+
+target_link_libraries(common PUBLIC fmt::fmt stb::headers Threads::Threads)
+target_link_libraries(common PRIVATE lz4::lz4 LLVM::Demangle)
+
+if (TARGET libzstd_static)
+ target_link_libraries(common PRIVATE libzstd_static)
+else()
+ target_link_libraries(common PRIVATE zstd)
+endif()
if(ANDROID)
# For ASharedMemory_create