Rewrite CMake dependency installation

Replaces the hard-coded library paths by a method based on CMake's
GetPrerequisites module which recursively finds a binary file's linked
libraries. Advantage: Potentially works on any system without adaption as
long as CMake supports it, so it could be used to create portable Linux
packages as well. Disadvantage: "Potentially".

Co-Authored-By: Hyunjin Song <tteu.ingog@gmail.com>
This commit is contained in:
Lukas W
2018-06-13 16:32:57 +02:00
committed by Hyunjin Song
parent c2eefe73d0
commit 4fd8e08f3b
8 changed files with 359 additions and 212 deletions

View File

@@ -162,6 +162,8 @@ SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
ADD_EXECUTABLE(RemoteZynAddSubFx RemoteZynAddSubFx.cpp "${WINRC}")
INSTALL(TARGETS RemoteZynAddSubFx RUNTIME DESTINATION "${PLUGIN_DIR}")
# Needed to deploy dependencies of RemoteZynAddSubFx
SET_PROPERTY(GLOBAL APPEND PROPERTY PLUGINS_BUILT "RemoteZynAddSubFx")
IF(LMMS_BUILD_WIN32)
SET_TARGET_PROPERTIES(RemoteZynAddSubFx PROPERTIES LINK_FLAGS "${LINK_FLAGS} -mwindows")