mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Generate single_sol in source dir
This commit is contained in:
parent
2d1abc9ae7
commit
cbe7d765ca
|
@ -179,9 +179,9 @@ install(TARGETS tests RUNTIME DESTINATION bin)
|
|||
|
||||
find_package(PythonInterp 3)
|
||||
if (PYTHONINTERP_FOUND)
|
||||
add_custom_command(OUTPUT single/sol.hpp COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/single && ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/single.py --output ${CMAKE_CURRENT_BINARY_DIR}/single/sol.hpp DEPENDS ${HEADER_SRCS})
|
||||
add_custom_target(single_sol DEPENDS single/sol.hpp)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/single/sol.hpp" DESTINATION include/single)
|
||||
add_custom_command(OUTPUT single/sol/sol.hpp COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/single.py --output ${CMAKE_CURRENT_SOURCE_DIR}/single/sol/sol.hpp DEPENDS ${HEADER_SRCS})
|
||||
add_custom_target(single_sol DEPENDS single/sol/sol.hpp)
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/single/sol/sol.hpp" DESTINATION include/single/sol)
|
||||
message(STATUS "single_sol can be generated as python 3 has been found.")
|
||||
else()
|
||||
message(STATUS "single_sol cannot be generated as python 3 has not been found.")
|
||||
|
|
Loading…
Reference in New Issue
Block a user