Skip to content
Snippets Groups Projects
Commit c1058bdb authored by Christoph Alt's avatar Christoph Alt
Browse files

also calling cmake make-find-module on custom python venvs

parent cd06d247
Branches
Tags v0.1a1
No related merge requests found
Pipeline #74371 passed with stages
in 2 minutes and 11 seconds
......@@ -54,20 +54,20 @@ if (CODEGEN_PRIVATE_VENV)
message( WARNING "Could not find ${CODEGEN_VENV_REQUIREMENTS}" )
endif()
# get the find pystencils-sfg file
execute_process(
COMMAND ${PystencilsSfg_PYTHON_INTERPRETER} -m pystencilssfg cmake make-find-module
WORKING_DIRECTORY ${CMAKE_FIND_PACKAGE_REDIRECTS_DIR}
)
# renaming it
file(RENAME ${CMAKE_FIND_PACKAGE_REDIRECTS_DIR}/FindPystencilsSfg.cmake ${CMAKE_FIND_PACKAGE_REDIRECTS_DIR}/pystencilssfg-config.cmake)
# Find it
find_package( PystencilsSfg REQUIRED )
set( _sfg_private_venv_done TRUE CACHE BOOL "" )
mark_as_advanced(_sfg_private_venv_done)
endif()
set(_sfg_cache_python_init ${_venv_python_exe})
set(PystencilsSfg_PYTHON_INTERPRETER ${_sfg_cache_python_init} CACHE PATH "Path to the Python executable used to run pystencils-sfg")
endif()
# get the find pystencils-sfg file
execute_process(
COMMAND ${PystencilsSfg_PYTHON_INTERPRETER} -m pystencilssfg cmake make-find-module
WORKING_DIRECTORY ${CMAKE_FIND_PACKAGE_REDIRECTS_DIR}
)
# renaming it
file(RENAME ${CMAKE_FIND_PACKAGE_REDIRECTS_DIR}/FindPystencilsSfg.cmake ${CMAKE_FIND_PACKAGE_REDIRECTS_DIR}/pystencilssfg-config.cmake)
# Find it
find_package( PystencilsSfg REQUIRED )
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment