Add cmake option controlling install targets

This commit is contained in:
Luminiscental 2021-02-21 17:14:10 +00:00
parent bf9f698a1b
commit 92d9804faf
No known key found for this signature in database
GPG Key ID: 855C5F980DA84332
1 changed files with 59 additions and 56 deletions

View File

@ -5,6 +5,7 @@ option(MSDFGEN_BUILD_MSDFGEN_STANDALONE "Build the msdfgen standalone executable
option(MSDFGEN_USE_OPENMP "Build with OpenMP support for multithreaded code" OFF)
option(MSDFGEN_USE_CPP11 "Build with C++11 enabled" ON)
option(MSDFGEN_USE_SKIA "Build with the Skia library" OFF)
option(MSDFGEN_INSTALL "Generate installation target" ON)
option(FREETYPE_WITH_PNG "Link libpng and zlib because FreeType is configured to require it" OFF)
option(FREETYPE_WITH_HARFBUZZ "Link HarfBuzz because FreeType is configured to require it" OFF)
@ -125,6 +126,7 @@ endif()
# Installation and exportation of the libraries
#----------------------------------------------------------------
if(MSDFGEN_INSTALL)
include(CMakePackageConfigHelpers)
set(MSDFGEN_CONFIG_PATH "lib/cmake/msdfgen")
@ -189,3 +191,4 @@ install(
NAMESPACE msdfgen::
DESTINATION ${MSDFGEN_CONFIG_PATH}
)
endif()