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,6 +5,36 @@ if(NOT TARGET redasm::redasm)
55 find_package (redasm REQUIRED )
66endif ()
77
8+ if (WIN32 )
9+ set (REDASM_INSTALL_PLUGINS "plugins/processors" )
10+ else ()
11+ include (GNUInstallDirs )
12+ set (REDASM_INSTALL_PLUGINS "${CMAKE_INSTALL_LIBDIR} /redasm/plugins/processors" )
13+ endif ()
14+
815add_subdirectory (capstonebundle )
916add_subdirectory (x86 )
1017add_subdirectory (mips )
18+
19+ get_property (subdirs DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR } " PROPERTY SUBDIRECTORIES)
20+
21+ foreach (subdir ${subdirs} )
22+ get_property (targets DIRECTORY ${subdir} PROPERTY BUILDSYSTEM_TARGETS)
23+
24+ foreach (target ${targets} )
25+ get_target_property (target_type ${target} TYPE)
26+
27+ if (target_type STREQUAL "SHARED_LIBRARY" )
28+ if (NOT WIN32 )
29+ set_target_properties (${target} PROPERTIES
30+ INSTALL_RPATH "$ORIGIN/../../../"
31+ )
32+ endif ()
33+
34+ install (TARGETS ${target}
35+ LIBRARY DESTINATION "${REDASM_INSTALL_PLUGINS} "
36+ RUNTIME DESTINATION "${REDASM_INSTALL_PLUGINS} "
37+ )
38+ endif ()
39+ endforeach ()
40+ endforeach ()
You can’t perform that action at this time.
0 commit comments