Commit e816e924 authored by Julien Malik's avatar Julien Malik

BUG: do not install unix bash scripts on windows

parent 75b53cdc
......@@ -26,16 +26,20 @@ set(APPLICATION_BINARY_PATH ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
# Generate a script in the build dir, next to the cli launcher
# Need a two-step process since configure_file don't support permissions
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/buildtree)
if (NOT WIN32)
configure_file( ${CMAKE_SOURCE_DIR}/CMake/otbgui.sh.buildtree.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/buildtree/otbgui
@ONLY )
file(COPY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/buildtree/otbgui
DESTINATION ${CLI_OUPUT_DIR}
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
endif(NOT WIN32)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/installtree)
if (NOT WIN32)
configure_file( ${CMAKE_SOURCE_DIR}/CMake/otbgui.sh.installtree.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/installtree/otbgui
@ONLY )
install(PROGRAMS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/installtree/otbgui
DESTINATION ${OTB_INSTALL_BIN_DIR_CM24})
endif(NOT WIN32)
......@@ -36,16 +36,22 @@ set(APPLICATION_BINARY_PATH ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
# Generate a script in the build dir, next to the cli launcher
# Need a two-step process since configure_file don't support permissions
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/buildtree)
if (NOT WIN32)
configure_file( ${CMAKE_SOURCE_DIR}/CMake/otbcli.sh.buildtree.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/buildtree/otbcli
@ONLY )
file(COPY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/buildtree/otbcli
DESTINATION ${CLI_OUPUT_DIR}
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
endif(NOT WIN32)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/installtree)
if (NOT WIN32)
configure_file( ${CMAKE_SOURCE_DIR}/CMake/otbcli.sh.installtree.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/installtree/otbcli
@ONLY )
install(PROGRAMS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/installtree/otbcli
DESTINATION ${OTB_INSTALL_BIN_DIR_CM24})
endif(NOT WIN32)
Markdown is supported
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