Skip to content

Commit

Permalink
Use fltk-config to avoid static library
Browse files Browse the repository at this point in the history
  • Loading branch information
Javier Serrano Polo committed May 4, 2016
1 parent 0c9bf9b commit 3bf5407
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions plugins/zynaddsubfx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,15 @@ SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${PLUGIN_DIR}")
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
ADD_EXECUTABLE(RemoteZynAddSubFx RemoteZynAddSubFx.cpp "${WINRC}")
INSTALL(TARGETS RemoteZynAddSubFx RUNTIME DESTINATION "${PLUGIN_DIR}")
SET(FLTK_FILTERED_LIBRARIES ${FLTK_LIBRARIES})
LIST(REMOVE_ITEM FLTK_FILTERED_LIBRARIES "${X11_X11_LIB}" "${X11_Xext_LIB}")
TARGET_LINK_LIBRARIES(RemoteZynAddSubFx zynaddsubfx_gui ZynAddSubFxCore ${FLTK_FILTERED_LIBRARIES} -lpthread )

SET(FLTK_FILTERED_LDFLAGS ${FLTK_LIBRARIES})
FIND_PROGRAM(FLTK_CONFIG fltk-config)
IF(FLTK_CONFIG)
EXECUTE_PROCESS(COMMAND ${FLTK_CONFIG} --ldflags OUTPUT_VARIABLE FLTK_FILTERED_LDFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
STRING(REPLACE " " ";" FLTK_FILTERED_LDFLAGS ${FLTK_FILTERED_LDFLAGS})
LIST(REMOVE_ITEM FLTK_FILTERED_LDFLAGS -lX11)
ENDIF()
TARGET_LINK_LIBRARIES(RemoteZynAddSubFx zynaddsubfx_gui ZynAddSubFxCore ${FLTK_FILTERED_LDFLAGS} -lpthread )

# link Qt libraries when on win32
IF(LMMS_BUILD_WIN32)
Expand Down

0 comments on commit 3bf5407

Please sign in to comment.