Skip to content

Commit

Permalink
Updated the search of the python3 in CMake(close #197)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikhailGorobets committed Aug 4, 2023
1 parent a12d93f commit 767eaba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
10 changes: 5 additions & 5 deletions RenderStateNotation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ set(RSN_PARSER_HEADERS_DIR ${CMAKE_CURRENT_BINARY_DIR}/parser_headers CACHE INTE
set(RSN_PARSER_GENERATED_HEADERS_DIR ${RSN_PARSER_HEADERS_DIR}/generated)
file(MAKE_DIRECTORY "${RSN_PARSER_GENERATED_HEADERS_DIR}")

find_package(PythonInterp 3 REQUIRED)
include(FindPython3)

execute_process(COMMAND ${PYTHON_EXECUTABLE} -m pip install libclang==15.0.6.1 # Fails with 16.0.0
execute_process(COMMAND ${Python3_EXECUTABLE} -m pip install libclang==15.0.6.1 # Fails with 16.0.0
RESULT_VARIABLE PYTHON_PIP_LIBCLANG_RESULT)
if(NOT PYTHON_PIP_LIBCLANG_RESULT EQUAL "0")
message(FATAL_ERROR "python -m pip install libclang failed with ${PYTHON_PIP_LIBCLANG_RESULT}")
message(FATAL_ERROR "${Python3_EXECUTABLE} -m pip install libclang failed with ${PYTHON_PIP_LIBCLANG_RESULT}")
endif()

execute_process(COMMAND ${PYTHON_EXECUTABLE} -m pip install jinja2
execute_process(COMMAND ${Python3_EXECUTABLE} -m pip install jinja2
RESULT_VARIABLE PYTHON_PIP_JINJIA_RESULT)
if(NOT PYTHON_PIP_JINJIA_RESULT EQUAL "0")
message(FATAL_ERROR "python -m pip install jinja2 failed with ${PYTHON_PIP_JINJIA_RESULT}")
Expand Down Expand Up @@ -61,7 +61,7 @@ else()
endif()

add_custom_command(OUTPUT ${GENERATED}
COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/scripts/cxx_generator.py" --dir "." --files ${REFLECTED}
COMMAND ${Python3_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/scripts/cxx_generator.py" --dir "." --files ${REFLECTED}
COMMAND ${FORMATTING_COMMAND}
WORKING_DIRECTORY "${RSN_PARSER_GENERATED_HEADERS_DIR}"
DEPENDS ${REFLECTED}
Expand Down
9 changes: 0 additions & 9 deletions RenderStatePackager/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,6 @@ PUBLIC

set_common_target_properties(Diligent-RenderStatePackagerLib)

#set_target_properties(Diligent-RenderStatePackagerLib PROPERTIES
# INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/${DILIGENT_CORE_DIR}/${CMAKE_BUILD_TYPE}"
#)






add_executable(Diligent-RenderStatePackager
src/main.cpp
README.md
Expand Down

0 comments on commit 767eaba

Please sign in to comment.