This allows the targets to be used in other cmake projects. See the following for more details: https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#creating-packages https://foonathan.net/blog/2016/07/07/cmake-dependency-handling.html
16 lines
533 B
CMake
16 lines
533 B
CMake
set(SOURCES InitializeDll.cpp InitializeDll.h)
|
|
|
|
add_library(OGLCompiler STATIC ${SOURCES})
|
|
set_property(TARGET OGLCompiler PROPERTY FOLDER glslang)
|
|
set_property(TARGET OGLCompiler PROPERTY POSITION_INDEPENDENT_CODE ON)
|
|
|
|
if(WIN32)
|
|
source_group("Source" FILES ${SOURCES})
|
|
endif(WIN32)
|
|
|
|
if(ENABLE_GLSLANG_INSTALL)
|
|
install(TARGETS OGLCompiler EXPORT OGLCompilerTargets
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
install(EXPORT OGLCompilerTargets DESTINATION ${LIB_INSTALL_DIR}/cmake)
|
|
endif(ENABLE_GLSLANG_INSTALL)
|