diff --git a/CMakeLists.txt b/CMakeLists.txt index 9737778..0cfad66 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,25 +9,25 @@ if(TARGET evmc) return() endif() -option(EVMC_INSTALL "Enable EVMC installation (e.g. make install)" ON) - -option(EVMC_TESTING "Build everything (libraries, tools, examples, internal tests)" OFF) - -option(EVMC_TOOLS "Build EVMC tools" ${EVMC_TESTING}) -if(EVMC_TESTING OR EVMC_TOOLS) - set(hunter_and_examples_required TRUE) -endif() -option(EVMC_EXAMPLES "Build EVMC examples" ${hunter_and_examples_required}) -option(HUNTER_ENABLED "Enable Hunter package manager support" ${hunter_and_examples_required}) - include(cmake/cable/bootstrap.cmake) include(CableBuildType) include(CableCompilerSettings) +include(CMakeDependentOption) include(CablePackage) include(CableToolchains) include(CMakePackageConfigHelpers) include(GNUInstallDirs) +option(EVMC_INSTALL "Enable EVMC installation (e.g. make install)" ON) + +option(EVMC_TESTING "Build everything (libraries, tools, examples, internal tests)" OFF) + +cmake_dependent_option(EVMC_TOOLS "Build EVMC tools" OFF + "NOT EVMC_TESTING" ON) + +option(EVMC_EXAMPLES "Build EVMC examples" ${EVMC_TOOLS}) +option(HUNTER_ENABLED "Enable Hunter package manager support" ${EVMC_TOOLS}) + if(HUNTER_ENABLED) set(HUNTER_CONFIGURATION_TYPES Release CACHE STRING "Build type of Hunter packages") include(HunterGate)