File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,7 +5,37 @@ if(NOT TARGET redasm::redasm)
55 find_package (redasm REQUIRED )
66endif ()
77
8+ if (WIN32 )
9+ set (REDASM_INSTALL_PLUGINS "plugins/loaders" )
10+ else ()
11+ include (GNUInstallDirs )
12+ set (REDASM_INSTALL_PLUGINS "${CMAKE_INSTALL_LIBDIR} /redasm/plugins/loaders" )
13+ endif ()
14+
815add_subdirectory (elf )
916add_subdirectory (mz )
1017add_subdirectory (psx )
1118add_subdirectory (xbe )
19+
20+ get_property (subdirs DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR } " PROPERTY SUBDIRECTORIES)
21+
22+ foreach (subdir ${subdirs} )
23+ get_property (targets DIRECTORY ${subdir} PROPERTY BUILDSYSTEM_TARGETS)
24+
25+ foreach (target ${targets} )
26+ get_target_property (target_type ${target} TYPE)
27+
28+ if (target_type STREQUAL "SHARED_LIBRARY" )
29+ if (NOT WIN32 )
30+ set_target_properties (${target} PROPERTIES
31+ INSTALL_RPATH "$ORIGIN/../../../"
32+ )
33+ endif ()
34+
35+ install (TARGETS ${target}
36+ LIBRARY DESTINATION "${REDASM_INSTALL_PLUGINS} "
37+ RUNTIME DESTINATION "${REDASM_INSTALL_PLUGINS} "
38+ )
39+ endif ()
40+ endforeach ()
41+ endforeach ()
You can’t perform that action at this time.
0 commit comments