blob: c54708b6a01ea5d4bca428a87d8a07b181f96df9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
Index: lmms-0.4.9/plugins/zynaddsubfx/CMakeLists.txt
===================================================================
--- lmms-0.4.9.orig/plugins/zynaddsubfx/CMakeLists.txt
+++ lmms-0.4.9/plugins/zynaddsubfx/CMakeLists.txt
@@ -47,7 +47,8 @@ IF(LMMS_BUILD_WIN32)
ADD_DEFINITIONS(-DPTW32_STATIC_LIB)
ENDIF(LMMS_BUILD_WIN32)
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/fltk/ ${CMAKE_CURRENT_SOURCE_DIR} ${FFTW3F_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} )
+FIND_PACKAGE(FLTK)
+INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${FFTW3F_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} )
set(ZASF_CORE_LIBS
zynaddsubfx_input
@@ -100,7 +101,7 @@ SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
ADD_EXECUTABLE(RemoteZynAddSubFx RemoteZynAddSubFx.cpp ${ZYN_SRC_GUI} ${WINRC})
INSTALL(TARGETS RemoteZynAddSubFx RUNTIME DESTINATION ${PLUGIN_DIR})
-TARGET_LINK_LIBRARIES(RemoteZynAddSubFx -lpthread -L${CMAKE_CURRENT_BINARY_DIR} -lZynAddSubFxCore ${CMAKE_CURRENT_BINARY_DIR}/fltk/lib/libfltk.a)
+TARGET_LINK_LIBRARIES(RemoteZynAddSubFx -lpthread -L${CMAKE_CURRENT_BINARY_DIR} -lZynAddSubFxCore ${FLTK_LIBRARIES})
ADD_DEPENDENCIES(RemoteZynAddSubFx ZynAddSubFxCore)
# link system libraries when on win32
@@ -108,26 +109,9 @@ IF(LMMS_BUILD_WIN32)
TARGET_LINK_LIBRARIES(RemoteZynAddSubFx ${QT_LIBRARIES} -lole32 -luuid -lcomctl32 -lgdi32 -lws2_32)
ENDIF(LMMS_BUILD_WIN32)
-# FLTK needs X
-IF(LMMS_BUILD_LINUX)
- FIND_PACKAGE(X11)
- FIND_PACKAGE(Freetype)
- TARGET_LINK_LIBRARIES(RemoteZynAddSubFx -ldl ${X11_LIBRARIES} ${X11_Xft_LIB} ${X11_Xinerama_LIB} ${FREETYPE_LIBRARY} -lfontconfig)
-ENDIF(LMMS_BUILD_LINUX)
-
-
IF(LMMS_BUILD_WIN32)
ADD_CUSTOM_COMMAND(TARGET RemoteZynAddSubFx POST_BUILD COMMAND ${STRIP} ${CMAKE_CURRENT_BINARY_DIR}/RemoteZynAddSubFx.exe)
ENDIF(LMMS_BUILD_WIN32)
-# build FLTK
-IF(LMMS_BUILD_WIN64)
- SET(FLTK_EXTRA_FLAGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/cmake/modules/Win64Toolchain.cmake")
-ELSEIF(LMMS_BUILD_WIN32)
- SET(FLTK_EXTRA_FLAGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/cmake/modules/Win32Toolchain.cmake")
-ENDIF(LMMS_BUILD_WIN64)
-ADD_CUSTOM_TARGET(libfltk COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/fltk && cd ${CMAKE_CURRENT_BINARY_DIR}/fltk && ${CMAKE_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR}/fltk ${FLTK_EXTRA_FLAGS} -DCMAKE_MODULE_PATH=${CMAKE_SOURCE_DIR}/cmake/modules/ -DFLTK_USE_SYSTEM_ZLIB:BOOL=ON -DFLTK_USE_SYSTEM_JPEG:BOOL=ON -DFLTK_USE_SYSTEM_PNG:BOOL=ON -DOPTION_BUILD_EXAMPLES:BOOL=OFF -DCMAKE_BUILD_TYPE=release && ${CMAKE_BUILD_TOOL})
-
-ADD_DEPENDENCIES(RemoteZynAddSubFx libfltk)
ENDIF(LMMS_HAVE_FFTW3F)
|