Skip to content

Commit

Permalink
Merge pull request #341 from simonpintarelli/develop
Browse files Browse the repository at this point in the history
Let cmake find the python command
  • Loading branch information
toxa81 authored Mar 18, 2019
2 parents f132977 + 5db8fed commit c37d074
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,13 @@ add_custom_command(
COMMAND true
)


find_package(Python REQUIRED Interpreter)

add_custom_command(
OUTPUT version.hpp-test
DEPENDS _always_rebuild
COMMAND python ${CMAKE_SOURCE_DIR}/make_version_hpp.py ${CMAKE_SOURCE_DIR}/VERSION > version.hpp-test
COMMAND ${Python_EXECUTABLE} ${CMAKE_SOURCE_DIR}/make_version_hpp.py ${CMAKE_SOURCE_DIR}/VERSION > version.hpp-test
)

set(version_hpp_path src/version.hpp)
Expand All @@ -181,6 +184,7 @@ add_custom_command(

add_custom_target(generate_version_hpp DEPENDS ${version_hpp_path})


set(runtime_options_json_path src/runtime_options_json.hpp)
add_custom_command(
OUTPUT ${runtime_options_json_path}
Expand Down

0 comments on commit c37d074

Please sign in to comment.