Skip to content

Commit 28f7e3a

Browse files
committed
fix CMakeList config on linux install (maybe?)
1 parent 9dad7af commit 28f7e3a

1 file changed

Lines changed: 32 additions & 30 deletions

File tree

CMakeLists.txt

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -47,38 +47,40 @@ if(ENABLE_INSTALL)
4747
install(TARGETS BCD1Creator CTRKViewer DEV7Launcher OBCViewer OBJDumper ModelPathDumper LoaderMDO
4848
RUNTIME DESTINATION bin)
4949

50-
# Create symlinks for all tools
51-
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
52-
${CMAKE_INSTALL_PREFIX}/bin/BCD1Creator
53-
${CMAKE_INSTALL_PREFIX}/bin/bcd1creator)")
54-
55-
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
56-
${CMAKE_INSTALL_PREFIX}/bin/CTRKViewer
57-
${CMAKE_INSTALL_PREFIX}/bin/ctrkviewer)")
58-
59-
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
60-
${CMAKE_INSTALL_PREFIX}/bin/DEV7Launcher
61-
${CMAKE_INSTALL_PREFIX}/bin/dev7launcher)")
62-
63-
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
64-
${CMAKE_INSTALL_PREFIX}/bin/OBCViewer
65-
${CMAKE_INSTALL_PREFIX}/bin/obcviewer)")
66-
67-
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
68-
${CMAKE_INSTALL_PREFIX}/bin/OBJDumper
69-
${CMAKE_INSTALL_PREFIX}/bin/objdumper)")
70-
71-
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
72-
${CMAKE_INSTALL_PREFIX}/bin/ModelPathDumper
73-
${CMAKE_INSTALL_PREFIX}/bin/modelpathdumper)")
74-
75-
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
76-
${CMAKE_INSTALL_PREFIX}/bin/LoaderMDO
77-
${CMAKE_INSTALL_PREFIX}/bin/loadermdo)")
50+
# Linux-only: Create symlinks for all tools
51+
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
52+
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
53+
${CMAKE_INSTALL_PREFIX}/bin/BCD1Creator
54+
${CMAKE_INSTALL_PREFIX}/bin/bcd1creator)")
55+
56+
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
57+
${CMAKE_INSTALL_PREFIX}/bin/CTRKViewer
58+
${CMAKE_INSTALL_PREFIX}/bin/ctrkviewer)")
59+
60+
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
61+
${CMAKE_INSTALL_PREFIX}/bin/DEV7Launcher
62+
${CMAKE_INSTALL_PREFIX}/bin/dev7launcher)")
63+
64+
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
65+
${CMAKE_INSTALL_PREFIX}/bin/OBCViewer
66+
${CMAKE_INSTALL_PREFIX}/bin/obcviewer)")
67+
68+
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
69+
${CMAKE_INSTALL_PREFIX}/bin/OBJDumper
70+
${CMAKE_INSTALL_PREFIX}/bin/objdumper)")
71+
72+
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
73+
${CMAKE_INSTALL_PREFIX}/bin/ModelPathDumper
74+
${CMAKE_INSTALL_PREFIX}/bin/modelpathdumper)")
75+
76+
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
77+
${CMAKE_INSTALL_PREFIX}/bin/LoaderMDO
78+
${CMAKE_INSTALL_PREFIX}/bin/loadermdo)")
79+
endif()
7880
endif()
7981

80-
# Uninstall command
81-
if(NOT TARGET uninstall)
82+
# Linux-only: Uninstall command
83+
if(NOT TARGET uninstall AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
8284
add_custom_target(uninstall
8385
COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_INSTALL_PREFIX}/bin/BCD1Creator"
8486
COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_INSTALL_PREFIX}/bin/bcd1creator"

0 commit comments

Comments
 (0)