Skip to content

Commit 2270713

Browse files
committed
Fix CMake rules when nesting CMake projects
`${CMAKE_SOURCE_DIR}` points to the outer project root, not the current directory. Fixes building of `glslang` when included into another CMake project.
1 parent 2041586 commit 2270713

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,9 @@ set(GLSLANG_GENERATED_INCLUDEDIR "${CMAKE_BINARY_DIR}/include")
237237
################################################################################
238238
# Build version information generation
239239
################################################################################
240-
set(GLSLANG_CHANGES_FILE "${CMAKE_SOURCE_DIR}/CHANGES.md")
241-
set(GLSLANG_BUILD_INFO_PY "${CMAKE_SOURCE_DIR}/build_info.py")
242-
set(GLSLANG_BUILD_INFO_H_TMPL "${CMAKE_SOURCE_DIR}/build_info.h.tmpl")
240+
set(GLSLANG_CHANGES_FILE "${CMAKE_CURRENT_SOURCE_DIR}/CHANGES.md")
241+
set(GLSLANG_BUILD_INFO_PY "${CMAKE_CURRENT_SOURCE_DIR}/build_info.py")
242+
set(GLSLANG_BUILD_INFO_H_TMPL "${CMAKE_CURRENT_SOURCE_DIR}/build_info.h.tmpl")
243243
set(GLSLANG_BUILD_INFO_H "${GLSLANG_GENERATED_INCLUDEDIR}/glslang/build_info.h")
244244

245245
# Command to build the build_info.h file

0 commit comments

Comments
 (0)