Skip to content

Commit d0f0381

Browse files
committed
Updated glslang, SPIRV-Cross, and SPIRV-Tools.
Use configure_file() for export headers so re-running CMake won't cause files to be re-built. Incremented version to 1.4.1.
1 parent e7e740d commit d0f0381

File tree

10 files changed

+30
-31
lines changed

10 files changed

+30
-31
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,11 @@ endif()
5858

5959
set(MSL_MAJOR_VERSION 1)
6060
set(MSL_MINOR_VERSION 4)
61-
set(MSL_PATCH_VERSION 0)
61+
set(MSL_PATCH_VERSION 1)
6262
set(MSL_VERSION ${MSL_MAJOR_VERSION}.${MSL_MINOR_VERSION}.${MSL_PATCH_VERSION})
6363

64+
set(MSL_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
65+
6466
include(cmake/config.cmake)
6567
include(cmake/install.cmake)
6668

Compile/SPIRV-Cross

Submodule SPIRV-Cross updated 714 files

Compile/SPIRV-Tools

Submodule SPIRV-Tools updated 471 files

Compile/glslang

Submodule glslang updated 922 files

azure-pipelines.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ trigger:
33
variables:
44
- name: cmake.commonArgs
55
value: -DCMAKE_FIND_ROOT_PATH=$(dependency.location) -DCMAKE_PREFIX_PATH=$(dependency.location)
6+
- name: boost.winVer
7+
value: $(BOOST_ROOT_1_72_0)
68
- group: Common
79
jobs:
810
- job: Linux
@@ -193,19 +195,19 @@ jobs:
193195
win32_static:
194196
arch: Win32
195197
lib.type: Static
196-
cmake.args: -DMSL_SHARED=OFF
198+
cmake.args: -DMSL_SHARED=OFF -DBOOST_ROOT=$(boost.winVer)
197199
win32_shared:
198200
arch: Win32
199201
lib.type: Shared
200-
cmake.args: -DMSL_SHARED=ON
202+
cmake.args: -DMSL_SHARED=ON -DBOOST_ROOT=$(boost.winVer)
201203
win64_static:
202204
arch: x64
203205
lib.type: Static
204-
cmake.args: -DMSL_SHARED=OFF
206+
cmake.args: -DMSL_SHARED=OFF -DBOOST_ROOT=$(boost.winVer)
205207
win64_shared:
206208
arch: x64
207209
lib.type: Shared
208-
cmake.args: -DMSL_SHARED=ON
210+
cmake.args: -DMSL_SHARED=ON -DBOOST_ROOT=$(boost.winVer)
209211
steps:
210212
- bash: |
211213
./update-submodules.sh
@@ -246,7 +248,7 @@ jobs:
246248
continueOnError: true
247249
timeoutInMinutes: 5
248250
env:
249-
PATH: $(PATH);$(BOOST_ROOT)\lib
251+
PATH: $(PATH);$(boost.winVer)\lib
250252
- task: PublishTestResults@2
251253
inputs:
252254
testResultsFormat: JUnit
@@ -273,7 +275,7 @@ jobs:
273275
continueOnError: true
274276
timeoutInMinutes: 5
275277
env:
276-
PATH: $(PATH);$(BOOST_ROOT)\lib
278+
PATH: $(PATH);$(boost.winVer)\lib
277279
- task: PublishTestResults@2
278280
inputs:
279281
testResultsFormat: JUnit

cmake/install.cmake

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2018 Aaron Barany
1+
# Copyright 2018-2020 Aaron Barany
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -47,26 +47,12 @@ function(msl_install_library)
4747
if (MSVC)
4848
set_property(TARGET ${ARGS_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS
4949
MSL_${moduleUpper}_BUILD)
50-
file(WRITE ${exportPath}
51-
"#pragma once\n\n"
52-
"#ifdef MSL_${moduleUpper}_BUILD\n"
53-
"#define MSL_${moduleUpper}_EXPORT __declspec(dllexport)\n"
54-
"#else\n"
55-
"#define MSL_${moduleUpper}_EXPORT __declspec(dllimport)\n"
56-
"#endif\n")
57-
elseif (CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
58-
file(WRITE ${exportPath}
59-
"#pragma once\n\n"
60-
"#define MSL_${moduleUpper}_EXPORT __attribute__((visibility(\"default\")))\n")
50+
configure_file(${MSL_SOURCE_DIR}/cmake/templates/WindowsExport.h.in ${exportPath} @ONLY)
6151
else()
62-
file(WRITE ${exportPath}
63-
"#pragma once\n\n"
64-
"#define MSL_${moduleUpper}_EXPORT\n")
52+
configure_file(${MSL_SOURCE_DIR}/cmake/templates/UnixExport.h.in ${exportPath} @ONLY)
6553
endif()
6654
else()
67-
file(WRITE ${exportPath}
68-
"#pragma once\n\n"
69-
"#define MSL_${moduleUpper}_EXPORT\n")
55+
configure_file(${MSL_SOURCE_DIR}/cmake/templates/NoExport.h.in ${exportPath} @ONLY)
7056
endif()
7157

7258
if (NOT MSL_INSTALL)
@@ -135,8 +121,7 @@ function(msl_install_master_config)
135121
else()
136122
set(configPackageDir lib/cmake/MSL)
137123
endif()
138-
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/cmake/MSLConfig.cmake
139-
DESTINATION ${MSL_EXPORTS_DIR})
140-
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cmake/MSLConfig.cmake ${versionPath}
124+
file(COPY ${MSL_SOURCE_DIR}/cmake/templates/MSLConfig.cmake DESTINATION ${MSL_EXPORTS_DIR})
125+
install(FILES ${MSL_SOURCE_DIR}/cmake/templates/MSLConfig.cmake ${versionPath}
141126
DESTINATION ${configPackageDir} COMPONENT dev)
142127
endfunction()

cmake/templates/NoExport.h.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#pragma once
2+
#define MSL_@moduleUpper@_EXPORT

cmake/templates/UnixExport.h.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#pragma once
2+
#define MSL_@moduleUpper@_EXPORT __attribute__((visibility("default")))

cmake/templates/WindowsExport.h.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#pragma once
2+
#ifdef MSL_@moduleUpper@_BUILD
3+
#define MSL_@moduleUpper@_EXPORT __declspec(dllexport)
4+
#else
5+
#define MSL_@moduleUpper@_EXPORT __declspec(dllimport)
6+
#endif

0 commit comments

Comments
 (0)