add cmake option to enable or disable using of msdf library
This commit is contained in:
4
3rdParty/msdf/CMakeLists.txt
vendored
4
3rdParty/msdf/CMakeLists.txt
vendored
@@ -1,3 +1,4 @@
|
||||
if (ENABLE_MSDF)
|
||||
include(FetchContent)
|
||||
|
||||
if(NOT DEFINED MSDFGEN_REPO)
|
||||
@@ -81,12 +82,15 @@ FetchContent_Declare(
|
||||
GIT_SHALLOW TRUE
|
||||
)
|
||||
FetchContent_MakeAvailable(msdfgen_atlas)
|
||||
endif()
|
||||
|
||||
function(LinkMsdf TARGET)
|
||||
if (ENABLE_MSDF)
|
||||
target_link_libraries(${TARGET} PRIVATE msdfgen::msdfgen msdfgen::msdfgen-ext msdf-atlas-gen)
|
||||
if (FREETYPE_BUILT_FROM_SOURCES)
|
||||
target_include_directories(${TARGET} PUBLIC ${FREETYPE_INCLUDE_DIR})
|
||||
else()
|
||||
target_include_directories(${TARGET} PUBLIC ${FREETYPE_INCLUDE_DIRS})
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
@@ -22,7 +22,7 @@ endif()
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
|
||||
|
||||
option(TRACY_ENABLE "Enable Tracy Profiler" OFF)
|
||||
|
||||
option(ENABLE_MSDF "Enable msdf library" ON)
|
||||
add_subdirectory(3rdParty)
|
||||
|
||||
project (openVulkanoCpp VERSION 1.0 LANGUAGES C CXX)
|
||||
|
||||
Reference in New Issue
Block a user