Skip to content

Commit

Permalink
Fix CMake rules when nesting CMake projects
Browse files Browse the repository at this point in the history
`${CMAKE_SOURCE_DIR}` points to the outer project root, not the current directory.

Fixes building of `glslang` when included into another CMake project.
  • Loading branch information
ben-clayton committed Jul 10, 2020
1 parent 2041586 commit 2270713
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@ set(GLSLANG_GENERATED_INCLUDEDIR "${CMAKE_BINARY_DIR}/include")
################################################################################
# Build version information generation
################################################################################
set(GLSLANG_CHANGES_FILE "${CMAKE_SOURCE_DIR}/CHANGES.md")
set(GLSLANG_BUILD_INFO_PY "${CMAKE_SOURCE_DIR}/build_info.py")
set(GLSLANG_BUILD_INFO_H_TMPL "${CMAKE_SOURCE_DIR}/build_info.h.tmpl")
set(GLSLANG_CHANGES_FILE "${CMAKE_CURRENT_SOURCE_DIR}/CHANGES.md")
set(GLSLANG_BUILD_INFO_PY "${CMAKE_CURRENT_SOURCE_DIR}/build_info.py")
set(GLSLANG_BUILD_INFO_H_TMPL "${CMAKE_CURRENT_SOURCE_DIR}/build_info.h.tmpl")
set(GLSLANG_BUILD_INFO_H "${GLSLANG_GENERATED_INCLUDEDIR}/glslang/build_info.h")

# Command to build the build_info.h file
Expand Down

0 comments on commit 2270713

Please sign in to comment.