File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,11 @@ option(USE_USER_BUS "Uses user bus" OFF)
1616find_package (Git)
1717
1818# Set version number and update submodules
19- if (EXISTS ${CMAKE_SOURCE_DIR } /.git AND GIT_FOUND)
19+ if (EXISTS ${PROJECT_SOURCE_DIR } /.git AND GIT_FOUND)
2020 execute_process (COMMAND ${GIT_EXECUTABLE} describe --tags
2121 OUTPUT_VARIABLE LOGIOPS_VERSION
2222 RESULT_VARIABLE LOGIOPS_VERSION_RET
23+ WORKING_DIRECTORY PROJECT_SOURCE_DIR
2324 ERROR_QUIET)
2425 if (NOT LOGIOPS_VERSION_RET EQUAL "0" )
2526 execute_process (COMMAND ${GIT_EXECUTABLE}
@@ -29,10 +30,11 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/.git AND GIT_FOUND)
2930 endif ()
3031
3132 execute_process (COMMAND ${GIT_EXECUTABLE}
32- submodule update --init --recursive)
33+ submodule update --init --recursive
34+ WORKING_DIRECTORY PROJECT_SOURCE_DIR )
3335
3436 string (REGEX REPLACE "\n $" "" LOGIOPS_VERSION ${LOGIOPS_VERSION} )
35- elseif (EXISTS ${CMAKE_SOURCE_DIR } /version .txt)
37+ elseif (EXISTS ${PROJECT_SOURCE_DIR } /version .txt)
3638 file (READ version .txt LOGIOPS_VERSION)
3739 string (REGEX REPLACE "\n $" "" LOGIOPS_VERSION ${LOGIOPS_VERSION} )
3840
You can’t perform that action at this time.
0 commit comments