Unverified Commit 410c6531 authored by gsn9's avatar gsn9 Committed by GitHub
Browse files

Camera plugin files ninja fix (#4815)

* added cutom target to copy over camera.plugin files on ninja install

* changed how script is being called and how cmake interacts with it

* fixed other non camera .plugin files not being installed/copied over
parent be1fb819
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -574,6 +574,13 @@ add_custom_target(export ALL COMMAND ${CMAKE_COMMAND} -E copy_if_different
  ${CMAKE_SOURCE_DIR}/appdata/export/* ${CMAKE_BINARY_DIR}/appdata/export)
add_dependencies(isis export)

# Create the updateBuildPlugins.sh.in file
configure_file(${CMAKE_SOURCE_DIR}/cmake/updateBuildPlugins.sh.in ${CMAKE_BINARY_DIR}/scripts/updateBuildPlugins.sh)

# Add custom build target to copy modified Camera.plugin files to the build/lib/Camera.plugin file
add_custom_target(cameraPlugins ALL COMMAND ${CMAKE_BINARY_DIR}/scripts/updateBuildPlugins.sh)
add_dependencies(isis cameraPlugins)

# Add a custom build target to clean out everything that gets added to the source
#  directory during the build process.
# - Only a few things are added in order to make the tests work properly so
@@ -593,6 +600,7 @@ install(FILES ${CMAKE_SOURCE_DIR}/../AUTHORS.rst DESTINATION ${CMAKE_INSTA
install(FILES     ${CMAKE_SOURCE_DIR}/../CHANGELOG.md DESTINATION  ${CMAKE_INSTALL_PREFIX})
install(FILES     ${CMAKE_BINARY_DIR}/version         DESTINATION  ${CMAKE_INSTALL_PREFIX})
install(DIRECTORY ${CMAKE_SOURCE_DIR}/scripts         DESTINATION  ${CMAKE_INSTALL_PREFIX})
install(PROGRAMS ${CMAKE_BINARY_DIR}/lib/Camera.plugin DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/)

# Trigger all post-install behavior.
# - The only way to run commands post-install in CMake is to add a subdirectory at
+8 −0
Original line number Diff line number Diff line
> ${CMAKE_BINARY_DIR}/lib/Camera.plugin

for i in find ${CMAKE_SOURCE_DIR}/src/*/objs/*/Camera.plugin
  do
    if test -f "$i"; then
        cat "$i" >> ${CMAKE_BINARY_DIR}/lib/Camera.plugin
    fi
done
 No newline at end of file