From 993d166d13e8639fbbea21f7eb98c684ad1e2bcc Mon Sep 17 00:00:00 2001 From: lynxnb Date: Wed, 31 Jul 2024 01:38:57 +0200 Subject: [PATCH] Skip finding Boost and CMake install --- CMakeLists.txt | 9 ++++++++- externals/CMakeLists.txt | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a60b4ec0f..d49746a08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,7 @@ option(DYNARMIC_USE_LLVM "Support disassembly of jitted x86_64 code using LLVM" option(DYNARMIC_USE_PRECOMPILED_HEADERS "Use precompiled headers" ON) option(DYNARMIC_USE_BUNDLED_EXTERNALS "Use all bundled externals (useful when e.g. cross-compiling)" OFF) option(DYNARMIC_WARNINGS_AS_ERRORS "Warnings as errors" ${MASTER_PROJECT}) +option(DYNARMIC_INSTALL "Install Dynarmic" ON) if (NOT DEFINED DYNARMIC_FRONTENDS) set(DYNARMIC_FRONTENDS "A32;A64" CACHE STRING "Selects which frontends to enable") endif() @@ -140,7 +141,9 @@ if (DYNARMIC_USE_BUNDLED_EXTERNALS) set(CMAKE_DISABLE_FIND_PACKAGE_Zydis ON) endif() -find_package(Boost 1.57 REQUIRED) +if (NOT TARGET Boost::boost) + find_package(Boost 1.57 REQUIRED) +endif() find_package(fmt 9 CONFIG) find_package(mcl 0.1.12 EXACT CONFIG) find_package(tsl-robin-map CONFIG) @@ -182,6 +185,10 @@ endif() # # Install # +if (NOT DYNARMIC_INSTALL) + return() +endif() + include(GNUInstallDirs) include(CMakePackageConfigHelpers) diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index f6b837bc4..70a6d1e66 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -35,14 +35,14 @@ endif() if (NOT TARGET fmt::fmt) # fmtlib formatting library - set(FMT_INSTALL ON) + set(FMT_INSTALL ${DYNARMIC_INSTALL}) add_subdirectory(fmt) endif() # mcl if (NOT TARGET merry::mcl) - set(MCL_INSTALL ON) + set(MCL_INSTALL ${DYNARMIC_INSTALL}) add_subdirectory(mcl) endif()