diff --git a/3rdParty/CMakeLists.txt b/3rdParty/CMakeLists.txt index 0d36cfb..9e6fb09 100644 --- a/3rdParty/CMakeLists.txt +++ b/3rdParty/CMakeLists.txt @@ -37,14 +37,14 @@ add_subdirectory(moodycamel_concurrentqueue) add_subdirectory(tinyusdz) add_subdirectory(dds_image) -if (NOT IOS AND ENABLE_CURL) +if (NOT IOS AND OPENVULKANO_ENABLE_CURL) add_subdirectory(curl) endif() -if (ENABLE_TEST) +if (OPENVULKANO_ENABLE_TEST) add_subdirectory(catch2) endif () -if (ENABLE_KTX) +if (OPENVULKANO_ENABLE_KTX) add_subdirectory(ktx-software) endif () \ No newline at end of file diff --git a/3rdParty/assimp/CMakeLists.txt b/3rdParty/assimp/CMakeLists.txt index 76d83da..8875b28 100644 --- a/3rdParty/assimp/CMakeLists.txt +++ b/3rdParty/assimp/CMakeLists.txt @@ -7,7 +7,7 @@ if (NOT IOS) endif () if (assimp_FOUND OR ASSIMP_FOUND) message("Using system assimp") -elseif (ENABLE_ASSIMP) +elseif (OPENVULKANO_ENABLE_ASSIMP) message("Building assimp from sources") if(NOT DEFINED ASSIMP_REPO) set(ASSIMP_REPO https://github.com/assimp/assimp.git) diff --git a/3rdParty/msdf/CMakeLists.txt b/3rdParty/msdf/CMakeLists.txt index 15e8db4..5295e00 100644 --- a/3rdParty/msdf/CMakeLists.txt +++ b/3rdParty/msdf/CMakeLists.txt @@ -1,4 +1,4 @@ -if (ENABLE_MSDF) +if (OPENVULKANO_ENABLE_MSDF) include(FetchContent) if(NOT DEFINED MSDFGEN_REPO) @@ -96,7 +96,7 @@ if (ENABLE_MSDF) endif() function(LinkMsdf TARGET) - if (ENABLE_MSDF) + if (OPENVULKANO_ENABLE_MSDF) target_link_libraries(${TARGET} PUBLIC msdfgen::msdfgen msdfgen::msdfgen-ext msdf-atlas-gen) if (FREETYPE_BUILT_FROM_SOURCES) target_include_directories(${TARGET} PUBLIC ${FREETYPE_INCLUDE_DIR}) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e2299a..1c960ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,14 +39,14 @@ project (OpenVulkano VERSION 1.0 LANGUAGES C CXX) SetOptimisationSettings() # ------------------------- CMAKE OPTIONS ------------------------- -option(TRACY_ENABLE "Enable Tracy Profiler" OFF) -option(ENABLE_ASSIMP "If assimp should be used" ON) -option(ENABLE_CURL "If curl should be used" ON) -option(ENABLE_KTX "If ktx images should be supported" ON) -option(ENABLE_TEST "Enable testing" ON) -option(ENABLE_EXAMPLE "Enable examples" ON) -option(ENABLE_MSDF "Enable msdf library" ON) -option(ENABLE_SHADERC "Enable runtime shader compiler" OFF) +option(OPENVULKANO_TRACY_ENABLE "Enable Tracy Profiler" OFF) +option(OPENVULKANO_ENABLE_ASSIMP "If assimp should be used" ON) +option(OPENVULKANO_ENABLE_CURL "If curl should be used" ON) +option(OPENVULKANO_ENABLE_KTX "If ktx images should be supported" ON) +option(OPENVULKANO_ENABLE_TEST "Enable testing" ON) +option(OPENVULKANO_ENABLE_EXAMPLES "Enable examples" ON) +option(OPENVULKANO_ENABLE_MSDF "Enable msdf library" ON) +option(OPENVULKANO_ENABLE_SHADERC "Enable runtime shader compiler" OFF) # ----------------------------------------------------------------- if (IOS) @@ -63,13 +63,13 @@ add_subdirectory(3rdParty) add_subdirectory(openVulkanoCpp) LinkTinyUSDZ(openVulkanoCpp) -if(ENABLE_TEST AND NOT IOS) +if(OPENVULKANO_ENABLE_TEST AND NOT IOS) enable_testing() add_subdirectory(tests) endif() # Finally generate the tests and examples -if(ENABLE_EXAMPLE) +if(OPENVULKANO_ENABLE_EXAMPLES) add_subdirectory(examples) set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT OpenVulkano_Examples) endif() diff --git a/cmake/functions/SetupVulkan.cmake b/cmake/functions/SetupVulkan.cmake index e67b840..1093fd7 100644 --- a/cmake/functions/SetupVulkan.cmake +++ b/cmake/functions/SetupVulkan.cmake @@ -5,7 +5,7 @@ function(SetupVulkan TARGET) else () find_package(Vulkan REQUIRED) target_link_libraries(${TARGET} PRIVATE Vulkan::Vulkan) - if (ENABLE_SHADERC) + if (OPENVULKANO_ENABLE_SHADERC) find_package(Vulkan OPTIONAL_COMPONENTS shaderc_combined) if (Vulkan_shaderc_combined_FOUND) target_link_libraries(${TARGET} PRIVATE Vulkan::shaderc_combined) diff --git a/openVulkanoCpp/CMakeLists.txt b/openVulkanoCpp/CMakeLists.txt index d2295be..6875b74 100644 --- a/openVulkanoCpp/CMakeLists.txt +++ b/openVulkanoCpp/CMakeLists.txt @@ -64,13 +64,13 @@ if (NOT ANDROID AND NOT IOS) target_link_libraries(openVulkanoCpp PUBLIC fontconfig) endif() target_link_libraries(openVulkanoCpp PUBLIC glfw pugixml ftxui::screen ftxui::dom ftxui::component) - if (ENABLE_CURL) + if (OPENVULKANO_ENABLE_CURL) LinkCurl(openVulkanoCpp) endif() endif() target_link_libraries(openVulkanoCpp PUBLIC magic_enum yaml-cpp fmt spdlog glm pugixml stb eigen utf8cpp imgui_internal TracyClient stud-uuid ryml unordered_dense concurrentqueue units dds_image) -if (ENABLE_KTX) +if (OPENVULKANO_ENABLE_KTX) target_link_libraries(openVulkanoCpp PUBLIC ktx) endif () LinkAssimp(openVulkanoCpp) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 754c655..1b477a7 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -7,7 +7,7 @@ include(Filter) cmake_path(GET CMAKE_CURRENT_SOURCE_DIR PARENT_PATH ROOT_FOLDER) file(GLOB_RECURSE SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") FilterPlatformPaths(SOURCES) -if (NOT ENABLE_CURL) +if (NOT OPENVULKANO_ENABLE_CURL) list(FILTER SOURCES EXCLUDE REGEX "WebResourceLoader") endif()