1
0
mirror of synced 2025-01-18 00:56:49 +01:00

build: Fix installing external plugins

This commit is contained in:
WerWolv 2024-01-04 10:25:29 +01:00
parent eca41cac16
commit cd72ff1f84
3 changed files with 16 additions and 5 deletions

View File

@ -65,10 +65,19 @@ macro(add_imhex_plugin)
add_definitions(-DIMHEX_PLUGIN_${IMHEX_PLUGIN_NAME}_FEATURE_${feature}=0)
endforeach()
# Fix rpath
if (APPLE)
set_target_properties(${IMHEX_PLUGIN_NAME} PROPERTIES INSTALL_RPATH "@executable_path/../Frameworks")
endif()
# Add the new plugin to the main dependency list so it gets built by default
if (TARGET imhex_all)
add_dependencies(imhex_all ${IMHEX_PLUGIN_NAME})
endif()
if (IMHEX_EXTERNAL_PLUGIN_BUILD)
install(TARGETS ${IMHEX_PLUGIN_NAME} DESTINATION ".")
endif()
endmacro()
macro(add_romfs_resource input output)

View File

@ -13,18 +13,20 @@ function(add_subdirectory_if_exists folder)
endif()
endfunction()
set(IMHEX_EXTERNAL_PLUGIN_BUILD ON)
set(IMHEX_EXTERNAL_PLUGIN_BUILD ON PARENT_SCOPE)
add_custom_target(imhex_all)
add_subdirectory(lib/third_party/imgui)
add_subdirectory_if_exists(lib/third_party/fmt)
add_subdirectory_if_exists(lib/third_party/nlohmann_json)
set(FMT_INSTALL OFF CACHE BOOL "" FORCE)
add_subdirectory_if_exists(lib/third_party/fmt)
set(FMT_LIBRARIES fmt::fmt-header-only PARENT_SCOPE)
add_subdirectory_if_exists(lib/third_party/nlohmann_json)
add_subdirectory(lib/external/libwolv)
set(LIBPL_BUILD_CLI_AS_EXECUTABLE OFF)
set(LIBPL_ENABLE_CLI OFF)
add_subdirectory(lib/external/pattern_language)
add_subdirectory(lib/libimhex)

@ -1 +1 @@
Subproject commit 312dc93becd44f24105baad2574b8449f449e831
Subproject commit 78cdc3e7fd67ec7c95a186ee97215ff29a0316ce