Merge pull request #969 from d3x0r/patch-1

Add option to skip installation
This commit is contained in:
John Kessenich 2017-07-04 11:00:42 -06:00 committed by GitHub
commit 17b5f9175d
9 changed files with 46 additions and 23 deletions

View File

@ -6,6 +6,11 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Adhere to GNU filesystem layout conventions
include(GNUInstallDirs)
option(SKIP_GLSLANG_INSTALL "Skip installation" ${SKIP_GLSLANG_INSTALL})
if(NOT ${SKIP_GLSLANG_INSTALL})
set(ENABLE_GLSLANG_INSTALL ON)
endif()
option(ENABLE_AMD_EXTENSIONS "Enables support of AMD-specific extensions" ON)
option(ENABLE_GLSLANG_BINARIES "Builds glslangValidator and spirv-remap" ON)

View File

@ -8,5 +8,7 @@ if(WIN32)
source_group("Source" FILES ${SOURCES})
endif(WIN32)
install(TARGETS OGLCompiler
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
if(ENABLE_GLSLANG_INSTALL)
install(TARGETS OGLCompiler
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif(ENABLE_GLSLANG_INSTALL)

View File

@ -53,7 +53,9 @@ if(WIN32)
source_group("Source" FILES ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
endif(WIN32)
install(TARGETS SPIRV SPVRemapper
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
if(ENABLE_GLSLANG_INSTALL)
install(TARGETS SPIRV SPVRemapper
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SPIRV/)
install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SPIRV/)
endif(ENABLE_GLSLANG_INSTALL)

View File

@ -38,8 +38,10 @@ if(WIN32)
source_group("Source" FILES ${SOURCES})
endif(WIN32)
install(TARGETS glslangValidator
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
if(ENABLE_GLSLANG_INSTALL)
install(TARGETS glslangValidator
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS spirv-remap
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS spirv-remap
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif(ENABLE_GLSLANG_INSTALL)

View File

@ -94,10 +94,14 @@ if(WIN32)
source_group("MachineIndependent\\Preprocessor" REGULAR_EXPRESSION "MachineIndependent/preprocessor/*")
endif(WIN32)
install(TARGETS glslang
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
if(ENABLE_GLSLANG_INSTALL)
install(TARGETS glslang
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif(ENABLE_GLSLANG_INSTALL)
foreach(file ${HEADERS})
get_filename_component(dir ${file} DIRECTORY)
install(FILES ${file} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/${dir})
endforeach()
if(ENABLE_GLSLANG_INSTALL)
foreach(file ${HEADERS})
get_filename_component(dir ${file} DIRECTORY)
install(FILES ${file} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/${dir})
endforeach()
endif(ENABLE_GLSLANG_INSTALL)

View File

@ -2,5 +2,7 @@ add_library(OSDependent STATIC ossource.cpp ../osinclude.h)
set_property(TARGET OSDependent PROPERTY FOLDER glslang)
set_property(TARGET OSDependent PROPERTY POSITION_INDEPENDENT_CODE ON)
install(TARGETS OSDependent
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
if(ENABLE_GLSLANG_INSTALL)
install(TARGETS OSDependent
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif(ENABLE_GLSLANG_INSTALL)

View File

@ -14,5 +14,7 @@ if(WIN32)
source_group("Source" FILES ${SOURCES})
endif(WIN32)
install(TARGETS OSDependent
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
if(ENABLE_GLSLANG_INSTALL)
install(TARGETS OSDependent
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif(ENABLE_GLSLANG_INSTALL)

View File

@ -28,8 +28,10 @@ if(BUILD_TESTING)
add_executable(glslangtests ${TEST_SOURCES})
set_property(TARGET glslangtests PROPERTY FOLDER tests)
glslang_set_link_args(glslangtests)
install(TARGETS glslangtests
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
if(ENABLE_GLSLANG_INSTALL)
install(TARGETS glslangtests
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif(ENABLE_GLSLANG_INSTALL)
set(GLSLANG_TEST_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../Test")
# Supply a default test root directory, so that manual testing

View File

@ -25,5 +25,7 @@ if(WIN32)
source_group("Source" FILES ${SOURCES} ${HEADERS})
endif(WIN32)
install(TARGETS HLSL
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
if(ENABLE_GLSLANG_INSTALL)
install(TARGETS HLSL
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif(ENABLE_GLSLANG_INSTALL)