Skip to content

Commit

Permalink
Merge pull request #641 from nim65s/master
Browse files Browse the repository at this point in the history
version: fix out-of-tree builds
  • Loading branch information
jcarpent authored Nov 22, 2023
2 parents 0b7f479 + ec2a4d5 commit 1a2bb02
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,11 @@ macro(VERSION_COMPUTE)
set(PROJECT_STABLE False)

if("${PROJECT_SOURCE_DIR}" STREQUAL "")
set(PROJECT_SOURCE_DIR "${PROJECT_JRL_CMAKE_MODULE_DIR}/..")
if(EXISTS "${PROJECT_JRL_CMAKE_MODULE_DIR}/../CMakeLists.txt")
set(PROJECT_SOURCE_DIR "${PROJECT_JRL_CMAKE_MODULE_DIR}/..")
else()
set(PROJECT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
endif()
endif()
if(NOT DEFINED PROJECT_VERSION_COMPUTATION_METHODS)
list(APPEND PROJECT_VERSION_COMPUTATION_METHODS "ROS_PACKAGE_XML_FILE"
Expand Down

0 comments on commit 1a2bb02

Please sign in to comment.