Skip to content

Commit

Permalink
fixed find python executable
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Tiderko committed Jan 12, 2024
1 parent a0be5f3 commit f1ca436
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions fkie_iop_builder/cmake/iop_build_macros.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ if(NOT EXISTS "${IOP_BUILDER_SCRIPT_DIR}/mss.py")
endif()

macro(iop_init_paths)
find_package (Python COMPONENTS Interpreter Development)
if ("${PROJECT_NAME}" STREQUAL "")
message(FATAL_ERROR "You must call project() first")
endif()
Expand Down Expand Up @@ -122,7 +123,7 @@ macro(iop_code_generator)

add_custom_command(
OUTPUT "jaus.xml"
COMMAND "${PYTHON_EXECUTABLE}" "${IOP_BUILDER_SCRIPT_DIR}/mss.py" "${CMAKE_CURRENT_BINARY_DIR}/jaus.xml" "${IOP_COMPONENT_NAME}" ${iop_arg_DEFAULT_IDLS} ${iop_arg_OWN_IDLS}
COMMAND "${Python_EXECUTABLE}" "${IOP_BUILDER_SCRIPT_DIR}/mss.py" "${CMAKE_CURRENT_BINARY_DIR}/jaus.xml" "${IOP_COMPONENT_NAME}" ${iop_arg_DEFAULT_IDLS} ${iop_arg_OWN_IDLS}
COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_CURRENT_BINARY_DIR}/jaus/"
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_INSTALL_PREFIX}/include"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
Expand All @@ -131,7 +132,7 @@ macro(iop_code_generator)

add_custom_command(
OUTPUT "jaus.overrides"
COMMAND "${PYTHON_EXECUTABLE}" "${IOP_BUILDER_SCRIPT_DIR}/cpy.py" "${IOP_COMPONENT_DIR}" ${iop_arg_OVERRIDE_HEADERS}
COMMAND "${Python_EXECUTABLE}" "${IOP_BUILDER_SCRIPT_DIR}/cpy.py" "${IOP_COMPONENT_DIR}" ${iop_arg_OVERRIDE_HEADERS}
COMMAND touch "${CMAKE_CURRENT_BINARY_DIR}/jaus.overrides"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
DEPENDS ${iop_arg_OVERRIDE_SOURCES} ${iop_arg_OVERRIDE_HEADERS} "jaus.xml"
Expand All @@ -141,8 +142,8 @@ macro(iop_code_generator)
OUTPUT "jaus.headers"
COMMAND "${Java_JAVA_EXECUTABLE}" ${CMAKE_JAVA_COMPILE_FLAGS} -classpath .:${jaustoolset_INCLUDE_JARS}:${jaustoolset_SHARE_PATH}/iop_codegenerator.jar -Djts.path=${jaustoolset_SHARE_PATH} org.jts.codegenerator.CodeGenerator -i "${CMAKE_CURRENT_BINARY_DIR}/jaus.xml" -o "${CMAKE_CURRENT_BINARY_DIR}/jaus" -n "${IOP_COMPONENT_NAME}" -p "'${IOP_NS_COMPONENTS}'"
COMMAND rm -fr ${iop_arg_EXTERN_INCLUDES} ${iop_arg_EXTERN_SRCS}
COMMAND "${PYTHON_EXECUTABLE}" "${IOP_BUILDER_SCRIPT_DIR}/chmerge.py" "${CMAKE_CURRENT_SOURCE_DIR}" "${IOP_COMPONENT_DIR}" ${iop_arg_OVERRIDE_HEADERS}
COMMAND "${PYTHON_EXECUTABLE}" "${IOP_BUILDER_SCRIPT_DIR}/chmerge.py" "${CMAKE_CURRENT_SOURCE_DIR}" "${IOP_COMPONENT_DIR}" ${iop_arg_OVERRIDE_SOURCES}
COMMAND "${Python_EXECUTABLE}" "${IOP_BUILDER_SCRIPT_DIR}/chmerge.py" "${CMAKE_CURRENT_SOURCE_DIR}" "${IOP_COMPONENT_DIR}" ${iop_arg_OVERRIDE_HEADERS}
COMMAND "${Python_EXECUTABLE}" "${IOP_BUILDER_SCRIPT_DIR}/chmerge.py" "${CMAKE_CURRENT_SOURCE_DIR}" "${IOP_COMPONENT_DIR}" ${iop_arg_OVERRIDE_SOURCES}
COMMAND touch "${CMAKE_CURRENT_BINARY_DIR}/jaus.headers"
COMMAND find ${CMAKE_INSTALL_PREFIX}/include -name "*.old" -type f -delete
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
Expand All @@ -151,7 +152,7 @@ macro(iop_code_generator)

add_custom_command(
OUTPUT "jaus.cpp"
COMMAND "${PYTHON_EXECUTABLE}" "${IOP_BUILDER_SCRIPT_DIR}/cpp.py" "${CMAKE_CURRENT_BINARY_DIR}/jaus.cpp" "${IOP_COMPONENT_DIR}" ${iop_arg_OVERRIDE_SOURCES}
COMMAND "${Python_EXECUTABLE}" "${IOP_BUILDER_SCRIPT_DIR}/cpp.py" "${CMAKE_CURRENT_BINARY_DIR}/jaus.cpp" "${IOP_COMPONENT_DIR}" ${iop_arg_OVERRIDE_SOURCES}
DEPENDS "jaus.headers"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
)
Expand Down

0 comments on commit f1ca436

Please sign in to comment.