Skip to content

Commit

Permalink
Fix python scripts executable path for macOS with using makefile base…
Browse files Browse the repository at this point in the history
…d generators.
  • Loading branch information
rperrot committed Dec 18, 2021
1 parent 1c5fe81 commit a75c605
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/software/SfM/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,19 @@ install(TARGETS openMVG_main_evalQuality DESTINATION bin/)
# Export tutorial with valid path thanks to a configuration file
##
set(OPENMVG_SOFTWARE_SFM_SRC_DIR ${CMAKE_CURRENT_LIST_DIR})
if(MSVC OR APPLE)
if(MSVC)
set(OPENMVG_SOFTWARE_SFM_BUILD_DIR "${EXECUTABLE_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}")
else()
set(OPENMVG_SOFTWARE_SFM_BUILD_DIR ${EXECUTABLE_OUTPUT_PATH})
if( APPLE )
if( CMAKE_GENERATOR MATCHES "Xcode" )
set(OPENMVG_SOFTWARE_SFM_BUILD_DIR "${EXECUTABLE_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}")
else()
set(OPENMVG_SOFTWARE_SFM_BUILD_DIR "${EXECUTABLE_OUTPUT_PATH}")
endif()
else()
# Linux
set(OPENMVG_SOFTWARE_SFM_BUILD_DIR ${EXECUTABLE_OUTPUT_PATH})
endif()
endif()

set(OPENMVG_TUTORIAL_IN_FILE "${CMAKE_CURRENT_LIST_DIR}/tutorial_demo.py.in")
Expand Down

0 comments on commit a75c605

Please sign in to comment.