From 6206091e634e9b93e68e0d448129dcaf147a61e3 Mon Sep 17 00:00:00 2001 From: Rohith Chandran Date: Tue, 4 Jul 2017 10:53:45 -0400 Subject: [PATCH] Fix CMake scripts: The set_property script can be used to set only a single property, so now setting the POSITION_INDEPENDENT_CODE property correctly. --- OGLCompilersDLL/CMakeLists.txt | 3 ++- SPIRV/CMakeLists.txt | 6 ++++-- StandAlone/CMakeLists.txt | 3 ++- glslang/CMakeLists.txt | 3 ++- glslang/OSDependent/Unix/CMakeLists.txt | 3 ++- glslang/OSDependent/Windows/CMakeLists.txt | 3 ++- hlsl/CMakeLists.txt | 3 ++- 7 files changed, 16 insertions(+), 8 deletions(-) diff --git a/OGLCompilersDLL/CMakeLists.txt b/OGLCompilersDLL/CMakeLists.txt index 8edd143e8..ddcc53649 100644 --- a/OGLCompilersDLL/CMakeLists.txt +++ b/OGLCompilersDLL/CMakeLists.txt @@ -1,7 +1,8 @@ set(SOURCES InitializeDll.cpp InitializeDll.h) add_library(OGLCompiler STATIC ${SOURCES}) -set_property(TARGET OGLCompiler PROPERTY FOLDER glslang POSITION_INDEPENDENT_CODE ON) +set_property(TARGET OGLCompiler PROPERTY FOLDER glslang) +set_property(TARGET OGLCompiler PROPERTY POSITION_INDEPENDENT_CODE ON) if(WIN32) source_group("Source" FILES ${SOURCES}) diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt index 2ad86d67f..8bc9aa77c 100755 --- a/SPIRV/CMakeLists.txt +++ b/SPIRV/CMakeLists.txt @@ -40,11 +40,13 @@ if(ENABLE_NV_EXTENSIONS) endif(ENABLE_NV_EXTENSIONS) add_library(SPIRV STATIC ${SOURCES} ${HEADERS}) -set_property(TARGET SPIRV PROPERTY FOLDER glslang POSITION_INDEPENDENT_CODE ON) +set_property(TARGET SPIRV PROPERTY FOLDER glslang) +set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON) target_link_libraries(SPIRV glslang) add_library(SPVRemapper STATIC ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS}) -set_property(TARGET SPVRemapper PROPERTY FOLDER glslang POSITION_INDEPENDENT_CODE ON) +set_property(TARGET SPVRemapper PROPERTY FOLDER glslang) +set_property(TARGET SPVRemapper PROPERTY POSITION_INDEPENDENT_CODE ON) if(WIN32) source_group("Source" FILES ${SOURCES} ${HEADERS}) diff --git a/StandAlone/CMakeLists.txt b/StandAlone/CMakeLists.txt index c61667cc0..d189f53da 100644 --- a/StandAlone/CMakeLists.txt +++ b/StandAlone/CMakeLists.txt @@ -1,6 +1,7 @@ add_library(glslang-default-resource-limits ${CMAKE_CURRENT_SOURCE_DIR}/ResourceLimits.cpp) -set_property(TARGET glslang-default-resource-limits PROPERTY FOLDER glslang POSITION_INDEPENDENT_CODE ON) +set_property(TARGET glslang-default-resource-limits PROPERTY FOLDER glslang) +set_property(TARGET glslang-default-resource-limits PROPERTY POSITION_INDEPENDENT_CODE ON) target_include_directories(glslang-default-resource-limits PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt index 7c9476d8d..75bb5dade 100644 --- a/glslang/CMakeLists.txt +++ b/glslang/CMakeLists.txt @@ -79,7 +79,8 @@ set(HEADERS # set(BISON_GLSLParser_OUTPUT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp) add_library(glslang STATIC ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${HEADERS}) -set_property(TARGET glslang PROPERTY FOLDER glslang POSITION_INDEPENDENT_CODE ON) +set_property(TARGET glslang PROPERTY FOLDER glslang) +set_property(TARGET glslang PROPERTY POSITION_INDEPENDENT_CODE ON) target_link_libraries(glslang OGLCompiler OSDependent) if(ENABLE_HLSL) target_link_libraries(glslang HLSL) diff --git a/glslang/OSDependent/Unix/CMakeLists.txt b/glslang/OSDependent/Unix/CMakeLists.txt index 99e9ce1b7..dd3664445 100644 --- a/glslang/OSDependent/Unix/CMakeLists.txt +++ b/glslang/OSDependent/Unix/CMakeLists.txt @@ -1,5 +1,6 @@ add_library(OSDependent STATIC ossource.cpp ../osinclude.h) -set_property(TARGET OSDependent PROPERTY FOLDER glslang POSITION_INDEPENDENT_CODE ON) +set_property(TARGET OSDependent PROPERTY FOLDER glslang) +set_property(TARGET OSDependent PROPERTY POSITION_INDEPENDENT_CODE ON) install(TARGETS OSDependent ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/glslang/OSDependent/Windows/CMakeLists.txt b/glslang/OSDependent/Windows/CMakeLists.txt index cc65ad6ad..0a35c8cfd 100644 --- a/glslang/OSDependent/Windows/CMakeLists.txt +++ b/glslang/OSDependent/Windows/CMakeLists.txt @@ -1,7 +1,8 @@ set(SOURCES ossource.cpp ../osinclude.h) add_library(OSDependent STATIC ${SOURCES}) -set_property(TARGET OSDependent PROPERTY FOLDER glslang POSITION_INDEPENDENT_CODE ON) +set_property(TARGET OSDependent PROPERTY FOLDER glslang) +set_property(TARGET OSDependent PROPERTY POSITION_INDEPENDENT_CODE ON) # MinGW GCC complains about function pointer casts to void*. # Turn that off with -fpermissive. diff --git a/hlsl/CMakeLists.txt b/hlsl/CMakeLists.txt index 24f5c9a1c..9a6de2815 100755 --- a/hlsl/CMakeLists.txt +++ b/hlsl/CMakeLists.txt @@ -18,7 +18,8 @@ set(HEADERS hlslParseables.h) add_library(HLSL STATIC ${SOURCES} ${HEADERS}) -set_property(TARGET HLSL PROPERTY FOLDER hlsl POSITION_INDEPENDENT_CODE ON) +set_property(TARGET HLSL PROPERTY FOLDER hlsl) +set_property(TARGET HLSL PROPERTY POSITION_INDEPENDENT_CODE ON) if(WIN32) source_group("Source" FILES ${SOURCES} ${HEADERS})