add OpenVulkano prefix to cmake options
This commit is contained in:
6
3rdParty/CMakeLists.txt
vendored
6
3rdParty/CMakeLists.txt
vendored
@@ -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 ()
|
||||
2
3rdParty/assimp/CMakeLists.txt
vendored
2
3rdParty/assimp/CMakeLists.txt
vendored
@@ -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)
|
||||
|
||||
4
3rdParty/msdf/CMakeLists.txt
vendored
4
3rdParty/msdf/CMakeLists.txt
vendored
@@ -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})
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user