2023-03-07 01:45:44 +03:00
|
|
|
diff --git a/cmake/Modules/Generate.cmake b/cmake/Modules/Generate.cmake
|
2023-03-20 09:29:43 +03:00
|
|
|
index 0ed67d63..9037fe05 100644
|
2023-03-07 01:45:44 +03:00
|
|
|
--- a/cmake/Modules/Generate.cmake
|
|
|
|
+++ b/cmake/Modules/Generate.cmake
|
2023-03-20 09:29:43 +03:00
|
|
|
@@ -157,11 +157,25 @@ function(IDLC_GENERATE_GENERIC)
|
2023-03-07 01:45:44 +03:00
|
|
|
endforeach()
|
|
|
|
|
|
|
|
list(APPEND _outputs ${_file_outputs})
|
|
|
|
- add_custom_command(
|
|
|
|
- OUTPUT ${_file_outputs}
|
|
|
|
- COMMAND ${_idlc_executable}
|
|
|
|
- ARGS ${_language} ${IDLC_ARGS} ${IDLC_INCLUDE_DIRS} ${_file}
|
|
|
|
- DEPENDS ${_files} ${_depends})
|
2023-03-20 09:29:43 +03:00
|
|
|
+ if(APPLE)
|
2023-03-07 01:45:44 +03:00
|
|
|
+ add_custom_command(
|
|
|
|
+ OUTPUT ${_file_outputs}
|
2023-03-20 09:29:43 +03:00
|
|
|
+ COMMAND ${CMAKE_COMMAND}
|
|
|
|
+ ARGS -E env "DYLD_LIBRARY_PATH=$<TARGET_FILE_DIR:${_idlc_executable}>/../../lib" $<TARGET_FILE:${_idlc_executable}> ${_language} ${IDLC_ARGS} ${IDLC_INCLUDE_DIRS} ${_file}
|
2023-03-07 01:45:44 +03:00
|
|
|
+ DEPENDS ${_files} ${_depends})
|
2023-03-20 09:29:43 +03:00
|
|
|
+ elseif(UNIX)
|
2023-03-07 01:45:44 +03:00
|
|
|
+ add_custom_command(
|
|
|
|
+ OUTPUT ${_file_outputs}
|
|
|
|
+ COMMAND ${CMAKE_COMMAND}
|
2023-03-20 09:29:43 +03:00
|
|
|
+ ARGS -E env "LD_LIBRARY_PATH=$<TARGET_FILE_DIR:${_idlc_executable}>/../../lib" $<TARGET_FILE:${_idlc_executable}> ${_language} ${IDLC_ARGS} ${IDLC_INCLUDE_DIRS} ${_file}
|
|
|
|
+ DEPENDS ${_files} ${_depends})
|
|
|
|
+ else()
|
|
|
|
+ add_custom_command(
|
|
|
|
+ OUTPUT ${_file_outputs}
|
|
|
|
+ COMMAND ${_idlc_executable}
|
|
|
|
+ ARGS ${_language} ${IDLC_ARGS} ${IDLC_INCLUDE_DIRS} ${_file}
|
2023-03-07 01:45:44 +03:00
|
|
|
+ DEPENDS ${_files} ${_depends})
|
|
|
|
+ endif()
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
add_custom_target("${_target}_generate" DEPENDS "${_outputs}")
|