diff options
author | Hanspeter Portner <dev@open-music-kontrollers.ch> | 2018-04-10 23:26:38 +0200 |
---|---|---|
committer | Hanspeter Portner <dev@open-music-kontrollers.ch> | 2018-04-10 23:28:44 +0200 |
commit | 682fd7ebd05def91ad65e8bfdbadb841e416fd31 (patch) | |
tree | 74f258e7b8a1740996517f409db8081e2c6b9c1c | |
parent | 033dabe4603060066420c46ffc2b579355dfdc33 (diff) | |
download | synthpod-682fd7ebd05def91ad65e8bfdbadb841e416fd31.tar.xz |
finalize migration to meson.
30 files changed, 241 insertions, 1202 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 2195bd68..00000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,233 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -project(synthpod) - -# pkg-config -find_package(PkgConfig REQUIRED) -include(CheckIncludeFiles) -include(CheckFunctionExists) -include(CheckSymbolExists) -include(FindUnixCommands) - -include_directories(${PROJECT_SOURCE_DIR}) -include_directories(${PROJECT_BINARY_DIR}) -include_directories(${PROJECT_SOURCE_DIR}/app) -include_directories(${PROJECT_SOURCE_DIR}/ardour.lv2) -include_directories(${PROJECT_SOURCE_DIR}/bin) -include_directories(${PROJECT_SOURCE_DIR}/bundle) -include_directories(${PROJECT_SOURCE_DIR}/ext_ui.lv2) -include_directories(${PROJECT_SOURCE_DIR}/include) -include_directories(${PROJECT_SOURCE_DIR}/jackey) -include_directories(${PROJECT_SOURCE_DIR}/mapper.lv2) -include_directories(${PROJECT_SOURCE_DIR}/netatom.lv2) -include_directories(${PROJECT_SOURCE_DIR}/nk_pugl) -include_directories(${PROJECT_SOURCE_DIR}/nuklear) -include_directories(${PROJECT_SOURCE_DIR}/osc.lv2) -include_directories(${PROJECT_SOURCE_DIR}/plugins) -include_directories(${PROJECT_SOURCE_DIR}/props.lv2) -include_directories(${PROJECT_SOURCE_DIR}/pugl) -include_directories(${PROJECT_SOURCE_DIR}/sandbox_ui.lv2) -include_directories(${PROJECT_SOURCE_DIR}/ui) -include_directories(${PROJECT_SOURCE_DIR}/varchunk) -include_directories(${PROJECT_SOURCE_DIR}/xpress.lv2) -include_directories(${PROJECT_SOURCE_DIR}/lfrtm) -include_directories(${PROJECT_SOURCE_DIR}/cross_clock) - -if(${CMAKE_VERSION} VERSION_LESS "3.9.0") - message(WARNING "Please consider to switch to CMake 3.9.0") - set(IPO_SUPPORTED NO) -else() - cmake_minimum_required(VERSION 3.9) - include(CheckIPOSupported) - check_ipo_supported(RESULT IPO_SUPPORTED) - message(STATUS "Link time optimizations enabled: ${IPO_SUPPORTED}") -endif() - -set(SYNTHPOD_BIN_DIR "bin") -add_definitions("-DSYNTHPOD_BIN_DIR=\"${CMAKE_INSTALL_PREFIX}/${SYNTHPOD_BIN_DIR}/\"") - -set(SYNTHPOD_BUNDLE_DIR "lib/synthpod/lv2") -add_definitions("-DSYNTHPOD_BUNDLE_DIR=\"${CMAKE_INSTALL_PREFIX}/${SYNTHPOD_BUNDLE_DIR}/\"") - -set(SYNTHPOD_PLUGIN_DIR "lib/lv2/synthpod.lv2") -add_definitions("-DSYNTHPOD_PLUGIN_DIR=\"${CMAKE_INSTALL_PREFIX}/${SYNTHPOD_PLUGIN_DIR}/\"") - -set(SYNTHPOD_ICON_DIR "share/icons/hicolor/256x256/apps") -add_definitions("-DSYNTHPOD_ICON_DIR=\"${CMAKE_INSTALL_PREFIX}/${SYNTHPOD_ICON_DIR}/\"") - -set(SYNTHPOD_DESKTOP_DIR "share/applications") -add_definitions("-DSYNTHPOD_DESKTOP_DIR=\"${CMAKE_INSTALL_PREFIX}/${SYNTHPOD_DESKTOP_DIR}/\"") - -file(STRINGS "VERSION" SYNTHPOD_VERSION) -string(REPLACE "." ";" VERSION_LIST ${SYNTHPOD_VERSION}) -list(GET VERSION_LIST 0 SYNTHPOD_MAJOR_VERSION) -list(GET VERSION_LIST 1 SYNTHPOD_MINOR_VERSION) -list(GET VERSION_LIST 2 SYNTHPOD_MICRO_VERSION) -add_definitions("-DSYNTHPOD_MINOR_VERSION=${SYNTHPOD_MINOR_VERSION}") -add_definitions("-DSYNTHPOD_MICRO_VERSION=${SYNTHPOD_MICRO_VERSION}") -add_definitions("-DSYNTHPOD_VERSION=\"${SYNTHPOD_VERSION}\"") - -set(CMAKE_C_FLAGS "-std=gnu11 -Wextra -Wformat -Wno-unused-parameter -Wno-attributes -ffast-math -fvisibility=hidden ${CMAKE_C_FLAGS}") -set(CMAKE_C_FLAGS "-Wshadow -Wimplicit-function-declaration -Wmissing-prototypes -Wstrict-prototypes ${CMAKE_C_FLAGS}") - -set(CMAKE_CXX_FLAGS "-std=gnu++11 -Wextra -ffast-math -fvisibility=hidden ${CMAKE_CXX_FLAGS}") -set(CMAKE_CXX_FLAGS "-Wshadow -Wredundant-decls -Wno-effc++ ${CMAKE_CXX_FLAGS}") - -set(CMAKE_EXE_LINKER_FLAGS "-Wl,-z,relro -Wl,-z,defs ${CMAKE_EXE_LINKER_FLAGS}") -set(CMAKE_MODULE_LINKER_FLAGS "-Wl,-z,relro -Wl,-z,nodelete -Wl,-z,defs ${CMAKE_MODULE_LINKER_FLAGS}") -set(CMAKE_SHARED_LINKER_FLAGS "-Wl,-z,relro -Wl,-z,defs ${CMAKE_SHARED_LINKER_FLAGS}") - -add_definitions("-D_GNU_SOURCE=1") # asprintf - -include(CheckCSourceCompiles) -CHECK_C_SOURCE_COMPILES(" - int main(int argc, char **argv) - { - void *src; - void *dst = __builtin_assume_aligned(src, 16); - return 0; - }" HAS_BUILTIN_ASSUME_ALIGNED) -if(${HAS_BUILTIN_ASSUME_ALIGNED}) - add_definitions("-DHAS_BUILTIN_ASSUME_ALIGNED") -endif() - -# options -option(BUILD_JACK "Build JACK standalone host" ON) -option(BUILD_ALSA "Build ALSA standalone host" ON) -option(BUILD_DUMMY "Build DUMMY standalone host" OFF) - -option(BUILD_UI "Build graphical user interface(s)" ON) - -option(USE_DYNAMIC_PARALLELIZER "Use dynamic scheduler for parallelization" ON) -if(USE_DYNAMIC_PARALLELIZER) - add_definitions("-DUSE_DYNAMIC_PARALLELIZER") -endif() - -include(CMakeDependentOption) - -pkg_search_module(XCB OPTIONAL xcb>=1.10) # XCB -pkg_search_module(XCB_ICCCM OPTIONAL xcb-icccm>=0.4) # XCB-ICCCM -if(XCB_FOUND AND XCB_ICCCM_FOUND) - cmake_dependent_option(BUILD_SANDBOX_X11 "Build X11 sandbox" ON "BUILD_UI" OFF) -else() - cmake_dependent_option(BUILD_SANDBOX_X11 "Build X11 sandbox" OFF "BUILD_UI" OFF) -endif() - -pkg_search_module(GTK2 OPTIONAL gtk+-2.0) # gtk+-2.0 -if(GTK2_FOUND) - cmake_dependent_option(BUILD_SANDBOX_GTK2 "Build GTK-2 sandbox" ON "BUILD_UI" OFF) -else() - cmake_dependent_option(BUILD_SANDBOX_GTK2 "Build GTK-2 sandbox" OFF "BUILD_UI" OFF) -endif() - -pkg_search_module(GTK3 OPTIONAL gtk+-3.0) # gtk+-3.0 -if(GTK3_FOUND) - cmake_dependent_option(BUILD_SANDBOX_GTK3 "Build GTK-3 sandbox" ON "BUILD_UI" OFF) -else() - cmake_dependent_option(BUILD_SANDBOX_GTK3 "Build GTK-3 sandbox" OFF "BUILD_UI" OFF) -endif() - -pkg_search_module(QT4CORE OPTIONAL QtCore) # Qt4Core -pkg_search_module(QT4GUI OPTIONAL QtGui) # Qt4Gui -if(QT4CORE_FOUND AND QT4GUI_FOUND) - cmake_dependent_option(BUILD_SANDBOX_QT4 "Build Qt-4 sandbox" ON "BUILD_UI" OFF) -else() - cmake_dependent_option(BUILD_SANDBOX_QT4 "Build Qt-4 sandbox" OFF "BUILD_UI" OFF) -endif() - -pkg_search_module(QT5CORE OPTIONAL Qt5Core) # Qt5Core -pkg_search_module(QT5WIDGETS OPTIONAL Qt5Widgets) # Qt5Widgets -pkg_search_module(QT5GUI OPTIONAL Qt5Gui) # Qt5Gui -if(QT5CORE_FOUND AND QT5WIDGETS_FOUND AND QT5GUI_FOUND) - cmake_dependent_option(BUILD_SANDBOX_QT5 "Build Qt-5 sandbox" ON "BUILD_UI" OFF) -else() - cmake_dependent_option(BUILD_SANDBOX_QT5 "Build Qt-5 sandbox" OFF "BUILD_UI" OFF) -endif() - -cmake_dependent_option(BUILD_SANDBOX_SHOW "Build show-iface sandbox" ON "BUILD_UI" OFF) -cmake_dependent_option(BUILD_SANDBOX_KX "Build external-ui sandbox" ON "BUILD_UI" OFF) - -if(BUILD_SANDBOX_X11) - add_definitions("-DSANDBOX_X11") -endif() -if(BUILD_SANDBOX_GTK2) - add_definitions("-DSANDBOX_GTK2") -endif() -if(BUILD_SANDBOX_GTK3) - add_definitions("-DSANDBOX_GTK3") -endif() -if(BUILD_SANDBOX_QT4) - add_definitions("-DSANDBOX_QT4") -endif() -if(BUILD_SANDBOX_QT5) - add_definitions("-DSANDBOX_QT5") -endif() -if(BUILD_SANDBOX_SHOW) - add_definitions("-DSANDBOX_SHOW") -endif() -if(BUILD_SANDBOX_KX) - add_definitions("-DSANDBOX_KX") -endif() - -# vectorization -include(CheckCCompilerFlag) -CHECK_C_COMPILER_FLAG("-ftree-vectorize" CAN_VECTORIZE) -if(${CAN_VECTORIZE}) - set(CMAKE_C_FLAGS "-ftree-vectorize ${CMAKE_C_FLAGS}") - #set(CMAKE_C_FLAGS "-ftree-vectorizer-verbose=1 ${CMAKE_C_FLAGS}") # GCC - #set(CMAKE_C_FLAGS "-Rpass=loop-vectorize ${CMAKE_C_FLAGS}") # CLANG -endif() - -# atomic operations -include(CheckCSourceCompiles) -CHECK_C_SOURCE_COMPILES(" - #include <stdlib.h> - #include <stdatomic.h> - int main(int argc, char **argv) - { - _Atomic size_t head; - atomic_init(&head, 0); - size_t chead = atomic_load_explicit(&head, memory_order_acquire); - chead += 1; - atomic_store_explicit(&head, chead, memory_order_release); - return 0; - }" HAS_ATOMIC) -if(NOT ${HAS_ATOMIC}) - message(FATAL_ERROR "compiler has no support for C11 atomic operations") -endif() - -# lilv -pkg_search_module(LILV REQUIRED lilv-0>=0.20) -include_directories(${LILV_INCLUDE_DIRS}) -if((${LILV_VERSION} VERSION_EQUAL "0.22.0") OR (${LILV_VERSION} VERSION_GREATER "0.22.0")) - add_definitions("-DLILV_0_22") -endif() - -# lv2 -pkg_search_module(LV2 REQUIRED lv2>=1.14) -include_directories(${LV2_INCLUDE_DIRS}) - -# sratom -pkg_search_module(SRATOM REQUIRED sratom-0>=0.4) -include_directories(${SRATOM_INCLUDE_DIRS}) - -if(DEFINED STATIC_LILV) - set(SRATOM_LDFLAGS ${LIBS} ${STATIC_SRATOM} ${STATIC_SORD} ${STATIC_SERD}) - set(LILV_LDFLAGS ${LIBS} ${STATIC_LILV} ${SRATOM_LDFLAGS}) -endif() - -set(BIN_LIBS - m rt pthread - ${LILV_LDFLAGS} - ${LV2_LDFLAGS} - ${SRATOM_LDFLAGS}) - -set(SANDBOX_LIBS - rt pthread - ${LILV_LDFLAGS}) - -add_subdirectory(app) -add_subdirectory(bin) -add_subdirectory(bundle) -add_subdirectory(plugins) -add_subdirectory(sandbox_ui.lv2) @@ -35,18 +35,17 @@ Get more detailed information at [http://open-music-kontrollers.ch/lv2/synthpod/ ### Build / install - git clone https://gitlab.com/OpenMusicKontrollers/synthpod.git + git clone https://git.open-music-kontrollers.ch/lv2/synthpod cd synthpod - mkdir build + meson build cd build - cmake .. - make - sudo make install + ninja -j8 + sudo ninja install #### ArchLinux # mandatory build dependencies - sudo pacman -S cmake lv2 lilv libuv + sudo pacman -S meson ninja lv2 lilv libuv # optional build dependencies sudo pacman -S jack alsa zita-alsa-pcmi libxcb gtk2 gtk3 qt4 qt @@ -1 +1 @@ -0.1.5607 +0.1.5611 diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt deleted file mode 100644 index e7852582..00000000 --- a/app/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -# synthpod.lib -add_library(synthpod.lib OBJECT - synthpod_app.c - synthpod_app_state.c - synthpod_app_worker.c - synthpod_app_ui.c - synthpod_app_mod.c - synthpod_app_port.c) -set_target_properties(synthpod.lib PROPERTIES POSITION_INDEPENDENT_CODE true) # -fPIC -set_target_properties(synthpod.lib PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${IPO_SUPPORTED}) # -flto diff --git a/app/synthpod_app.c b/app/synthpod_app.c index fb1d1de4..c26f5f30 100644 --- a/app/synthpod_app.c +++ b/app/synthpod_app.c @@ -1076,7 +1076,7 @@ sp_app_new(const LilvWorld *world, sp_app_driver_t *driver, void *data) lilv_node_free(node_false); } lilv_world_load_all(app->world); - LilvNode *synthpod_bundle = lilv_new_file_uri(app->world, NULL, SYNTHPOD_BUNDLE_DIR"/"); + LilvNode *synthpod_bundle = lilv_new_file_uri(app->world, NULL, SYNTHPOD_BUNDLE_DIR); if(synthpod_bundle) { lilv_world_load_bundle(app->world, synthpod_bundle); diff --git a/bin/CMakeLists.txt b/bin/CMakeLists.txt deleted file mode 100644 index def18b6c..00000000 --- a/bin/CMakeLists.txt +++ /dev/null @@ -1,297 +0,0 @@ -if(BUILD_JACK OR BUILD_ALSA OR BUILD_DUMMY) -# icon - install(FILES ${PROJECT_SOURCE_DIR}/data/pix/synthpod.png DESTINATION - ${SYNTHPOD_ICON_DIR}) - - add_library(synthpod.bin OBJECT - synthpod_bin.c - nsmc.c) - - set_target_properties(synthpod.bin PROPERTIES POSITION_INDEPENDENT_CODE true) # -fPIC - set_target_properties(synthpod.bin PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${IPO_SUPPORTED}) # -flto -endif() - -if(BUILD_JACK) -# jack - pkg_search_module(JACK REQUIRED jack) - include_directories(${JACK_INCLUDE_DIRS}) - -# metadata - include(CheckIncludeFiles) - CHECK_INCLUDE_FILES("jack/metadata.h" JACK_HAS_METADATA_API) - if(${JACK_HAS_METADATA_API}) - add_definitions("-DJACK_HAS_METADATA_API") - endif() - - include(CheckLibraryExists) - CHECK_LIBRARY_EXISTS(jack jack_get_cycle_times "" JACK_HAS_CYCLE_TIMES) - if(${JACK_HAS_CYCLE_TIMES}) - add_definitions("-DJACK_HAS_CYCLE_TIMES") - endif() - - if(APPLE) - set(JACK_LIBS ${CORE_AUDIO} ${CORE_SERVICES} ${AUDIO_UNIT} jack) - else() - set(JACK_LIBS ${JACK_LDFLAGS}) - endif() - -# synthpod - add_executable(synthpod.jack - synthpod_jack.c - $<TARGET_OBJECTS:synthpod.bin> - $<TARGET_OBJECTS:synthpod.lib> - $<TARGET_OBJECTS:sandbox_master.lib>) - target_link_libraries(synthpod.jack - ${JACK_LIBS} - ${BIN_LIBS}) - set_target_properties(synthpod.jack PROPERTIES POSITION_INDEPENDENT_CODE true) # -fPIE - set_target_properties(synthpod.jack PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${IPO_SUPPORTED}) # -flto - set_target_properties(synthpod.jack PROPERTIES OUTPUT_NAME "synthpod_jack") - install(TARGETS synthpod.jack DESTINATION bin) - -# desktop file - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/synthpod_jack.desktop.in - ${PROJECT_BINARY_DIR}/bin/synthpod_jack.desktop @ONLY) - install(FILES ${PROJECT_BINARY_DIR}/bin/synthpod_jack.desktop DESTINATION - ${SYNTHPOD_DESKTOP_DIR}) - -# man page - add_custom_command( - OUTPUT ${PROJECT_BINARY_DIR}/synthpod_jack.1.gz - COMMAND ${GZIP} ARGS - "-c9" ${CMAKE_CURRENT_SOURCE_DIR}/synthpod_jack.1 - ">" ${PROJECT_BINARY_DIR}/synthpod_jack.1.gz - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/synthpod_jack.1) - add_custom_target(SYNTHPOD_JACK_MAN_GZ ALL DEPENDS ${PROJECT_BINARY_DIR}/synthpod_jack.1.gz) - install(FILES "${PROJECT_BINARY_DIR}/synthpod_jack.1.gz" DESTINATION share/man/man1) -endif() - -if(BUILD_ALSA) -# zita_alsa_pcmi - find_library(ZITA_ALSA_PCMI_LIBRARY NAMES zita-alsa-pcmi libzita-alsa-pcmi - PATHS ${TOOLCHAIN}) - find_path(ZITA_ALSA_PCMI_INCLUDE_DIR zita-alsa-pcmi.h) - if(NOT (ZITA_ALSA_PCMI_LIBRARY AND ZITA_ALSA_PCMI_INCLUDE_DIR)) - message(FATAL_ERROR "zita-alsa-pcmi not found") - endif() - - include_directories(${ZITA_ALSA_PCMI_INCLUDE_DIR}) - -# ALSA - pkg_search_module(ALSA REQUIRED alsa>=1.0) - include_directories(${ALSA_INCLUDE_DIRS}) - -# synthpod - add_executable(synthpod.alsa - pcmi.cpp - synthpod_alsa.c - $<TARGET_OBJECTS:synthpod.bin> - $<TARGET_OBJECTS:synthpod.lib> - $<TARGET_OBJECTS:sandbox_master.lib>) - target_link_libraries(synthpod.alsa - asound #FIXME - ${ZITA_ALSA_PCMI_LIBRARY} - ${BIN_LIBS}) - set_target_properties(synthpod.alsa PROPERTIES POSITION_INDEPENDENT_CODE true) # -fPIE - set_target_properties(synthpod.alsa PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${IPO_SUPPORTED}) # -flto - set_target_properties(synthpod.alsa PROPERTIES OUTPUT_NAME "synthpod_alsa") - install(TARGETS synthpod.alsa DESTINATION bin) - -# desktop file - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/synthpod_alsa.desktop.in - ${PROJECT_BINARY_DIR}/bin/synthpod_alsa.desktop @ONLY) - install(FILES ${PROJECT_BINARY_DIR}/bin/synthpod_alsa.desktop DESTINATION - ${SYNTHPOD_DESKTOP_DIR}) - -# man page - add_custom_command( - OUTPUT ${PROJECT_BINARY_DIR}/synthpod_alsa.1.gz - COMMAND ${GZIP} ARGS - "-c9" ${CMAKE_CURRENT_SOURCE_DIR}/synthpod_alsa.1 - ">" ${PROJECT_BINARY_DIR}/synthpod_alsa.1.gz - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/synthpod_alsa.1) - add_custom_target(SYNTHPOD_ALSA_MAN_GZ ALL DEPENDS ${PROJECT_BINARY_DIR}/synthpod_alsa.1.gz) - install(FILES "${PROJECT_BINARY_DIR}/synthpod_alsa.1.gz" DESTINATION share/man/man1) -endif() - -if(BUILD_DUMMY) -# synthpod - add_executable(synthpod.dummy - synthpod_dummy.c - $<TARGET_OBJECTS:synthpod.bin> - $<TARGET_OBJECTS:synthpod.lib> - $<TARGET_OBJECTS:sandbox_master.lib>) - target_link_libraries(synthpod.dummy - ${BIN_LIBS}) - set_target_properties(synthpod.dummy PROPERTIES POSITION_INDEPENDENT_CODE true) # -fPIE - set_target_properties(synthpod.dummy PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${IPO_SUPPORTED}) # -flto - set_target_properties(synthpod.dummy PROPERTIES OUTPUT_NAME "synthpod_dummy") - install(TARGETS synthpod.dummy DESTINATION bin) - -# desktop file - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/synthpod_dummy.desktop.in - ${PROJECT_BINARY_DIR}/bin/synthpod_dummy.desktop @ONLY) - install(FILES ${PROJECT_BINARY_DIR}/bin/synthpod_dummy.desktop DESTINATION - ${SYNTHPOD_DESKTOP_DIR}) - -# man page - add_custom_command( - OUTPUT ${PROJECT_BINARY_DIR}/synthpod_dummy.1.gz - COMMAND ${GZIP} ARGS - "-c9" ${CMAKE_CURRENT_SOURCE_DIR}/synthpod_dummy.1 - ">" ${PROJECT_BINARY_DIR}/synthpod_dummy.1.gz - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/synthpod_dummy.1) - add_custom_target(SYNTHPOD_DUMMY_MAN_GZ ALL DEPENDS ${PROJECT_BINARY_DIR}/synthpod_dummy.1.gz) - install(FILES "${PROJECT_BINARY_DIR}/synthpod_dummy.1.gz" DESTINATION share/man/man1) -endif() - -if(BUILD_UI AND BUILD_SANDBOX_X11) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/synthpod_ui.in - ${PROJECT_BINARY_DIR}/bin/synthpod_ui @ONLY) - install(PROGRAMS ${PROJECT_BINARY_DIR}/bin/synthpod_ui DESTINATION bin) -endif() - -if( BUILD_SANDBOX_X11 - OR BUILD_SANDBOX_GTK2 OR BUILD_SANDBOX_GTK3 - OR BUILD_SANDBOX_QT4 OR BUILD_SANDBOX_QT5 - OR BUILD_SANDBOX_SHOW OR BUILD_SANDBOX_KX) -# man page - add_custom_command( - OUTPUT ${PROJECT_BINARY_DIR}/synthpod_sandbox.1.gz - COMMAND ${GZIP} ARGS - "-c9" ${CMAKE_CURRENT_SOURCE_DIR}/synthpod_sandbox.1 - ">" ${PROJECT_BINARY_DIR}/synthpod_sandbox.1.gz - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/synthpod_sandbox.1) - add_custom_target(SYNTHPOD_SANDBOX_MAN_GZ ALL DEPENDS ${PROJECT_BINARY_DIR}/synthpod_sandbox.1.gz) - install(FILES "${PROJECT_BINARY_DIR}/synthpod_sandbox.1.gz" DESTINATION share/man/man1) -endif() - -if(BUILD_SANDBOX_X11) - if(NOT (XCB_FOUND AND XCB_ICCCM_FOUND)) - message(FATAL_ERROR "xcb or xcb-icccm not found") - endif() - - add_executable(synthpod.sandbox.x11 - synthpod_sandbox_x11.c - $<TARGET_OBJECTS:sandbox_slave.lib>) - target_link_libraries(synthpod.sandbox.x11 - ${XCB_LDFLAGS} - ${XCB_ICCCM_LDFLAGS} - ${SANDBOX_LIBS}) - target_include_directories(synthpod.sandbox.x11 PUBLIC ${XCB_INCLUDE_DIRS}) - target_include_directories(synthpod.sandbox.x11 PUBLIC ${XCB_ICCCM_INCLUDE_DIRS}) - set_target_properties(synthpod.sandbox.x11 PROPERTIES POSITION_INDEPENDENT_CODE true) # -fPIE - set_target_properties(synthpod.sandbox.x11 PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${IPO_SUPPORTED}) # -flto - set_target_properties(synthpod.sandbox.x11 PROPERTIES OUTPUT_NAME "synthpod_sandbox_x11") - install(TARGETS synthpod.sandbox.x11 DESTINATION bin) -endif() - -if(BUILD_SANDBOX_GTK2) - if(NOT GTK2_FOUND) - message(FATAL_ERROR "gtk2 not found") - endif() - - add_executable(synthpod.sandbox.gtk2 - synthpod_sandbox_gtk.c - $<TARGET_OBJECTS:sandbox_slave.lib>) - target_link_libraries(synthpod.sandbox.gtk2 - ${GTK2_LDFLAGS} - ${SANDBOX_LIBS}) - target_include_directories(synthpod.sandbox.gtk2 PUBLIC ${GTK2_INCLUDE_DIRS}) - set_target_properties(synthpod.sandbox.gtk2 PROPERTIES POSITION_INDEPENDENT_CODE true) # -fPIE - set_target_properties(synthpod.sandbox.gtk2 PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${IPO_SUPPORTED}) # -flto - set_target_properties(synthpod.sandbox.gtk2 PROPERTIES OUTPUT_NAME "synthpod_sandbox_gtk2") - install(TARGETS synthpod.sandbox.gtk2 DESTINATION bin) -endif() - -if(BUILD_SANDBOX_GTK3) - if(NOT GTK3_FOUND) - message(FATAL_ERROR "gtk3 not found") - endif() - - add_executable(synthpod.sandbox.gtk3 - synthpod_sandbox_gtk.c - $<TARGET_OBJECTS:sandbox_slave.lib>) - target_link_libraries(synthpod.sandbox.gtk3 - ${GTK3_LDFLAGS} - ${SANDBOX_LIBS}) - target_include_directories(synthpod.sandbox.gtk3 PUBLIC ${GTK3_INCLUDE_DIRS}) - set_target_properties(synthpod.sandbox.gtk3 PROPERTIES POSITION_INDEPENDENT_CODE true) # -fPIE - set_target_properties(synthpod.sandbox.gtk3 PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${IPO_SUPPORTED}) # -flto - set_target_properties(synthpod.sandbox.gtk3 PROPERTIES OUTPUT_NAME "synthpod_sandbox_gtk3") - install(TARGETS synthpod.sandbox.gtk3 DESTINATION bin) -endif() - -if(BUILD_SANDBOX_QT4) - if(NOT (QT4CORE_FOUND AND QT4GUI_FOUND)) - message(FATAL_ERROR "qt4 not found") - endif() - - add_executable(synthpod.sandbox.qt4 - synthpod_sandbox_qt.cpp - $<TARGET_OBJECTS:sandbox_slave.lib>) - target_link_libraries(synthpod.sandbox.qt4 - ${QT4CORE_LDFLAGS} - ${QT4GUI_LDFLAGS} - ${SANDBOX_LIBS}) - target_include_directories(synthpod.sandbox.qt4 PUBLIC ${QT4CORE_INCLUDE_DIRS}) - target_include_directories(synthpod.sandbox.qt4 PUBLIC ${QT4GUI_INCLUDE_DIRS}) - set_target_properties(synthpod.sandbox.qt4 PROPERTIES COMPILE_DEFINITIONS "SYNTHPOD_SANDBOX_QT=4") - set_target_properties(synthpod.sandbox.qt4 PROPERTIES OUTPUT_NAME "synthpod_sandbox_qt4") - set_target_properties(synthpod.sandbox.qt4 PROPERTIES POSITION_INDEPENDENT_CODE true) # -fPIE - set_target_properties(synthpod.sandbox.qt4 PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${IPO_SUPPORTED}) # -flto - set_target_properties(synthpod.sandbox.qt4 PROPERTIES COMPILE_OPTIONS "-fPIC") # -fPIE is not enough for Qt - install(TARGETS synthpod.sandbox.qt4 DESTINATION bin) -endif() - -if(BUILD_SANDBOX_QT5) - if(NOT (QT5CORE_FOUND AND QT5WIDGETS_FOUND AND QT5GUI_FOUND)) - message(FATAL_ERROR "qt5 not found") - endif() - - add_executable(synthpod.sandbox.qt5 - synthpod_sandbox_qt.cpp - $<TARGET_OBJECTS:sandbox_slave.lib>) - target_link_libraries(synthpod.sandbox.qt5 - ${QT5CORE_LDFLAGS} - ${QT5WIDGETS_LDFLAGS} - ${QT5GUI_LDFLAGS} - ${SANDBOX_LIBS}) - target_include_directories(synthpod.sandbox.qt5 PUBLIC ${QT5CORE_INCLUDE_DIRS}) - target_include_directories(synthpod.sandbox.qt5 PUBLIC ${QT5WIDGETS_INCLUDE_DIRS}) - target_include_directories(synthpod.sandbox.qt5 PUBLIC ${QT5GUI_INCLUDE_DIRS}) - set_target_properties(synthpod.sandbox.qt5 PROPERTIES COMPILE_DEFINITIONS "SYNTHPOD_SANDBOX_QT=5") - set_target_properties(synthpod.sandbox.qt5 PROPERTIES OUTPUT_NAME "synthpod_sandbox_qt5") - set_target_properties(synthpod.sandbox.qt5 PROPERTIES POSITION_INDEPENDENT_CODE true) # -fPIE - set_target_properties(synthpod.sandbox.qt5 PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${IPO_SUPPORTED}) # -flto - set_target_properties(synthpod.sandbox.qt5 PROPERTIES COMPILE_OPTIONS "-fPIC") # -fPIE is not enough for Qt - install(TARGETS synthpod.sandbox.qt5 DESTINATION bin) -endif() - -if(BUILD_SANDBOX_SHOW) - add_executable(synthpod.sandbox.show - synthpod_sandbox_show.c - $<TARGET_OBJECTS:sandbox_slave.lib>) - target_link_libraries(synthpod.sandbox.show - ${SANDBOX_LIBS}) - set_target_properties(synthpod.sandbox.show PROPERTIES OUTPUT_NAME "synthpod_sandbox_show") - set_target_properties(synthpod.sandbox.show PROPERTIES POSITION_INDEPENDENT_CODE true) # -fPIE - set_target_properties(synthpod.sandbox.show PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${IPO_SUPPORTED}) # -flto - install(TARGETS synthpod.sandbox.show DESTINATION bin) -endif() - -if(BUILD_SANDBOX_KX) - add_executable(synthpod.sandbox.kx - synthpod_sandbox_kx.c - $<TARGET_OBJECTS:sandbox_slave.lib>) - target_link_libraries(synthpod.sandbox.kx - ${SANDBOX_LIBS}) - set_target_properties(synthpod.sandbox.kx PROPERTIES OUTPUT_NAME "synthpod_sandbox_kx") - set_target_properties(synthpod.sandbox.kx PROPERTIES POSITION_INDEPENDENT_CODE true) # -fPIE - set_target_properties(synthpod.sandbox.kx PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${IPO_SUPPORTED}) # -flto - install(TARGETS synthpod.sandbox.kx DESTINATION bin) -endif() diff --git a/bin/meson.build b/bin/meson.build index c42ab66a..0a661c66 100644 --- a/bin/meson.build +++ b/bin/meson.build @@ -1,4 +1,4 @@ -bin_incs = [inc_incs, app_incs, xpress_incs, osc_incs, extui_incs, ardour_incs, varchunk_incs, crossclock_incs, lfrtm_incs, mapper_incs, sbox_incs] +bin_incs = [inc_incs, app_incs, xpress_incs, osc_incs, extui_incs, ardour_incs, varchunk_incs, crossclock_incs, lfrtm_incs, mapper_incs, sbox_incs, props_incs, pugl_incs, self_incs] bin_deps = [m_dep, rt_dep, lv2_dep, thread_dep, lilv_dep] bin_srcs = ['synthpod_bin.c', @@ -18,8 +18,9 @@ dummy = executable('synthpod_dummy', dummy_srcs, link_with : [bin, app, sbox_master], install : true) +install_man('synthpod_dummy.1') + if alsa_dep.found() and zita_dep.found() - add_languages('cpp') alsa_srcs = ['synthpod_alsa.c', 'pcmi.cpp'] alsa = executable('synthpod_alsa', alsa_srcs, @@ -28,6 +29,8 @@ if alsa_dep.found() and zita_dep.found() dependencies : [bin_deps, alsa_dep, zita_dep], link_with : [bin, app, sbox_master], install : true) + + install_man('synthpod_alsa.1') endif if jack_dep.found() @@ -39,6 +42,8 @@ if jack_dep.found() dependencies : [bin_deps, jack_dep], link_with : [bin, app, sbox_master], install : true) + + install_man('synthpod_jack.1') endif if xcb_dep.found() and xcbicccm_dep.found() @@ -75,10 +80,11 @@ if gtk3_dep.found() endif if qt4_dep.found() - add_languages('cpp') + qt4_mod = import('qt4') qt4_srcs = ['synthpod_sandbox_qt.cpp'] + qt4_mocs = qt4_mod.preprocess(moc_sources : qt4_srcs) - qt4 = executable('synthpod_sandbox_qt4', qt4_srcs, + qt4 = executable('synthpod_sandbox_qt4', [qt4_srcs, qt4_mocs], include_directories : bin_incs, cpp_args : '-DSYNTHPOD_SANDBOX_QT=4', c_args : c_args, @@ -88,10 +94,11 @@ if qt4_dep.found() endif if qt5_dep.found() - add_languages('cpp') + qt5_mod = import('qt5') qt5_srcs = ['synthpod_sandbox_qt.cpp'] + qt5_mocs = qt5_mod.preprocess(moc_sources : qt5_srcs) - qt5 = executable('synthpod_sandbox_qt5', qt5_srcs, + qt5 = executable('synthpod_sandbox_qt5', [qt5_srcs, qt5_mocs], include_directories : bin_incs, cpp_args : '-DSYNTHPOD_SANDBOX_QT=5', c_args : c_args, @@ -103,7 +110,7 @@ endif if true #FIXME only build with enabled UI show_srcs = ['synthpod_sandbox_show.c'] - gtk3 = executable('synthpod_sandbox_show', show_srcs, + show = executable('synthpod_sandbox_show', show_srcs, include_directories : bin_incs, c_args : c_args, dependencies : [rt_dep, thread_dep], @@ -114,10 +121,12 @@ endif if true #FIXME only build with enabled UI kx_srcs = ['synthpod_sandbox_kx.c'] - gtk3 = executable('synthpod_sandbox_kx', kx_srcs, + kx = executable('synthpod_sandbox_kx', kx_srcs, include_directories : bin_incs, c_args : c_args, dependencies : [rt_dep, thread_dep], link_with : [sbox_slave], install : true) endif + +install_man('synthpod_sandbox.1') diff --git a/bin/synthpod_sandbox_qt.cpp b/bin/synthpod_sandbox_qt.cpp index 70bfa4d7..d4f331da 100644 --- a/bin/synthpod_sandbox_qt.cpp +++ b/bin/synthpod_sandbox_qt.cpp @@ -33,7 +33,7 @@ # include <QtWidgets/QApplication> # include <QtWidgets/QMainWindow> #else -# error "SYNTHPOD_QT is invalid" +# error "SYNTHPOD_SANDBOX_QT is invalid" #endif typedef struct _app_t app_t; @@ -181,10 +181,4 @@ main(int argc, char **argv) return -1; } -#if (SYNTHPOD_SANDBOX_QT == 4) -# include <synthpod_sandbox_qt4_moc.h> -#elif (SYNTHPOD_SANDBOX_QT == 5) -# include <synthpod_sandbox_qt5_moc.h> -#else -# error "SYNTHPOD_QT is invalid" -#endif +#include <synthpod_sandbox_qt.moc> diff --git a/bin/synthpod_sandbox_qt4_moc.h b/bin/synthpod_sandbox_qt4_moc.h deleted file mode 100644 index d2f81171..00000000 --- a/bin/synthpod_sandbox_qt4_moc.h +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** Meta object code from reading C++ file 'synthpod_sandbox_qt.cpp' -** -** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.7) -** -** WARNING! All changes made in this file will be lost! -*****************************************************************************/ - -#if !defined(Q_MOC_OUTPUT_REVISION) -#error "The header file 'synthpod_sandbox_qt.cpp' doesn't include <QObject>." -#elif Q_MOC_OUTPUT_REVISION != 63 -#error "This file was generated using the moc from 4.8.7. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" -#endif - -QT_BEGIN_MOC_NAMESPACE -static const uint qt_meta_data_MyWindow[] = { - - // content: - 6, // revision - 0, // classname - 0, 0, // classinfo - 0, 0, // methods - 0, 0, // properties - 0, 0, // enums/sets - 0, 0, // constructors - 0, // flags - 0, // signalCount - - 0 // eod -}; - -static const char qt_meta_stringdata_MyWindow[] = { - "MyWindow\0" -}; - -void MyWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) -{ - Q_UNUSED(_o); - Q_UNUSED(_id); - Q_UNUSED(_c); - Q_UNUSED(_a); -} - -const QMetaObjectExtraData MyWindow::staticMetaObjectExtraData = { - 0, qt_static_metacall -}; - -const QMetaObject MyWindow::staticMetaObject = { - { &QMainWindow::staticMetaObject, qt_meta_stringdata_MyWindow, - qt_meta_data_MyWindow, &staticMetaObjectExtraData } -}; - -#ifdef Q_NO_DATA_RELOCATION -const QMetaObject &MyWindow::getStaticMetaObject() { return staticMetaObject; } -#endif //Q_NO_DATA_RELOCATION - -const QMetaObject *MyWindow::metaObject() const -{ - return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject; -} - -void *MyWindow::qt_metacast(const char *_clname) -{ - if (!_clname) return 0; - if (!strcmp(_clname, qt_meta_stringdata_MyWindow)) - return static_cast<void*>(const_cast< MyWindow*>(this)); - return QMainWindow::qt_metacast(_clname); -} - -int MyWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) -{ - _id = QMainWindow::qt_metacall(_c, _id, _a); - if (_id < 0) - return _id; - return _id; -} -QT_END_MOC_NAMESPACE diff --git a/bin/synthpod_sandbox_qt5_moc.h b/bin/synthpod_sandbox_qt5_moc.h deleted file mode 100644 index 1d8d14d3..00000000 --- a/bin/synthpod_sandbox_qt5_moc.h +++ /dev/null @@ -1,91 +0,0 @@ -/**************************************************************************** -** Meta object code from reading C++ file 'synthpod_sandbox_qt.cpp' -** -** Created by: The Qt Meta Object Compiler version 67 (Qt 5.8.0) -** -** WARNING! All changes made in this file will be lost! -*****************************************************************************/ - -#include <QtCore/qbytearray.h> -#include <QtCore/qmetatype.h> -#if !defined(Q_MOC_OUTPUT_REVISION) -#error "The header file 'synthpod_sandbox_qt.cpp' doesn't include <QObject>." -#elif Q_MOC_OUTPUT_REVISION != 67 -#error "This file was generated using the moc from 5.8.0. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" -#endif - -QT_BEGIN_MOC_NAMESPACE -QT_WARNING_PUSH -QT_WARNING_DISABLE_DEPRECATED -struct qt_meta_stringdata_MyWindow_t { - QByteArrayData data[1]; - char stringdata0[9]; -}; -#define QT_MOC_LITERAL(idx, ofs, len) \ - Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ - qptrdiff(offsetof(qt_meta_stringdata_MyWindow_t, stringdata0) + ofs \ - - idx * sizeof(QByteArrayData)) \ - ) -static const qt_meta_stringdata_MyWindow_t qt_meta_stringdata_MyWindow = { - { -QT_MOC_LITERAL(0, 0, 8) // "MyWindow" - - }, - "MyWindow" -}; -#undef QT_MOC_LITERAL - -static const uint qt_meta_data_MyWindow[] = { - - // content: - 7, // revision - 0, // classname - 0, 0, // classinfo - 0, 0, // methods - 0, 0, // properties - 0, 0, // enums/sets - 0, 0, // constructors - 0, // flags - 0, // signalCount - - 0 // eod -}; - -void MyWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) -{ - Q_UNUSED(_o); - Q_UNUSED(_id); - Q_UNUSED(_c); - Q_UNUSED(_a); -} - -const QMetaObject MyWindow::staticMetaObject = { - { &QMainWindow::staticMetaObject, qt_meta_stringdata_MyWindow.data, - qt_meta_data_MyWindow, qt_static_metacall, Q_NULLPTR, Q_NULLPTR} -}; - - -const QMetaObject *MyWindow::metaObject() const -{ - return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; -} - -void *MyWindow::qt_metacast(const char *_clname) -{ - if (!_clname) return Q_NULLPTR; - if (!strcmp(_clname, qt_meta_stringdata_MyWindow.stringdata0)) - return static_cast<void*>(const_cast< MyWindow*>(this)); - return QMainWindow::qt_metacast(_clname); -} - -int MyWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) -{ - _id = QMainWindow::qt_metacall(_c, _id, _a); - if (_id < 0) - return _id; - return _id; -} -QT_WARNING_POP -QT_END_MOC_NAMESPACE diff --git a/bundle/CMakeLists.txt b/bundle/CMakeLists.txt deleted file mode 100644 index 3546ea13..00000000 --- a/bundle/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -# synthpod_bundle.lv2 -add_library(synthpod_bundle.lv2 MODULE - synthpod_bundle.c) -set_target_properties(synthpod_bundle.lv2 PROPERTIES PREFIX "" OUTPUT_NAME "synthpod_bundle") -set_target_properties(synthpod_bundle.lv2 PROPERTIES POSITION_INDEPENDENT_CODE true) # -fPIC -set_target_properties(synthpod_bundle.lv2 PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${IPO_SUPPORTED}) # -flto -install(TARGETS synthpod_bundle.lv2 DESTINATION ${SYNTHPOD_BUNDLE_DIR}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/synthpod_bundle.ttl DESTINATION ${SYNTHPOD_BUNDLE_DIR}) - -# manifest -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/manifest.ttl.in ${PROJECT_BINARY_DIR}/bundle/manifest.ttl) -install(FILES ${PROJECT_BINARY_DIR}/bundle/manifest.ttl DESTINATION ${SYNTHPOD_BUNDLE_DIR}) diff --git a/bundle/manifest.ttl.in b/bundle/manifest.ttl.in index a93429ce..229a8468 100644 --- a/bundle/manifest.ttl.in +++ b/bundle/manifest.ttl.in @@ -21,74 +21,74 @@ # Synthpod System Source synthpod:source a lv2:Plugin ; - lv2:minorVersion @SYNTHPOD_MINOR_VERSION@ ; - lv2:microVersion @SYNTHPOD_MICRO_VERSION@ ; - lv2:binary <synthpod_bundle@CMAKE_SHARED_MODULE_SUFFIX@> ; + lv2:minorVersion @MINOR_VERSION@ ; + lv2:microVersion @MICRO_VERSION@ ; + lv2:binary <synthpod_bundle@MODULE_SUFFIX@> ; rdfs:seeAlso <synthpod_bundle.ttl> . # Synthpod System Sink synthpod:sink a lv2:Plugin ; - lv2:minorVersion @SYNTHPOD_MINOR_VERSION@ ; - lv2:microVersion @SYNTHPOD_MICRO_VERSION@ ; - lv2:binary <synthpod_bundle@CMAKE_SHARED_MODULE_SUFFIX@> ; + lv2:minorVersion @MINOR_VERSION@ ; + lv2:microVersion @MICRO_VERSION@ ; + lv2:binary <synthpod_bundle@MODULE_SUFFIX@> ; rdfs:seeAlso <synthpod_bundle.ttl> . # Synthpod OSC Source synthpod:osc_source a lv2:Plugin ; - lv2:minorVersion @SYNTHPOD_MINOR_VERSION@ ; - lv2:microVersion @SYNTHPOD_MICRO_VERSION@ ; - lv2:binary <synthpod_bundle@CMAKE_SHARED_MODULE_SUFFIX@> ; + lv2:minorVersion @MINOR_VERSION@ ; + lv2:microVersion @MICRO_VERSION@ ; + lv2:binary <synthpod_bundle@MODULE_SUFFIX@> ; rdfs:seeAlso <synthpod_bundle.ttl> . # Synthpod OSC Sink synthpod:osc_sink a lv2:Plugin ; - lv2:minorVersion @SYNTHPOD_MINOR_VERSION@ ; - lv2:microVersion @SYNTHPOD_MICRO_VERSION@ ; - lv2:binary <synthpod_bundle@CMAKE_SHARED_MODULE_SUFFIX@> ; + lv2:minorVersion @MINOR_VERSION@ ; + lv2:microVersion @MICRO_VERSION@ ; + lv2:binary <synthpod_bundle@MODULE_SUFFIX@> ; rdfs:seeAlso <synthpod_bundle.ttl> . # Synthpod MIDI Source synthpod:midi_source a lv2:Plugin ; - lv2:minorVersion @SYNTHPOD_MINOR_VERSION@ ; - lv2:microVersion @SYNTHPOD_MICRO_VERSION@ ; - lv2:binary <synthpod_bundle@CMAKE_SHARED_MODULE_SUFFIX@> ; + lv2:minorVersion @MINOR_VERSION@ ; + lv2:microVersion @MICRO_VERSION@ ; + lv2:binary <synthpod_bundle@MODULE_SUFFIX@> ; rdfs:seeAlso <synthpod_bundle.ttl> . # Synthpod MIDI Sink synthpod:midi_sink a lv2:Plugin ; - lv2:minorVersion @SYNTHPOD_MINOR_VERSION@ ; - lv2:microVersion @SYNTHPOD_MICRO_VERSION@ ; - lv2:binary <synthpod_bundle@CMAKE_SHARED_MODULE_SUFFIX@> ; + lv2:minorVersion @MINOR_VERSION@ ; + lv2:microVersion @MICRO_VERSION@ ; + lv2:binary <synthpod_bundle@MODULE_SUFFIX@> ; rdfs:seeAlso <synthpod_bundle.ttl> . # Synthpod Audio Source synthpod:audio_source a lv2:Plugin ; - lv2:minorVersion @SYNTHPOD_MINOR_VERSION@ ; - lv2:microVersion @SYNTHPOD_MICRO_VERSION@ ; - lv2:binary <synthpod_bundle@CMAKE_SHARED_MODULE_SUFFIX@> ; + lv2:minorVersion @MINOR_VERSION@ ; + lv2:microVersion @MICRO_VERSION@ ; + lv2:binary <synthpod_bundle@MODULE_SUFFIX@> ; rdfs:seeAlso <synthpod_bundle.ttl> . # Synthpod Audio Sink synthpod:audio_sink a lv2:Plugin ; - lv2:minorVersion @SYNTHPOD_MINOR_VERSION@ ; - lv2:microVersion @SYNTHPOD_MICRO_VERSION@ ; - lv2:binary <synthpod_bundle@CMAKE_SHARED_MODULE_SUFFIX@> ; + lv2:minorVersion @MINOR_VERSION@ ; + lv2:microVersion @MICRO_VERSION@ ; + lv2:binary <synthpod_bundle@MODULE_SUFFIX@> ; rdfs:seeAlso <synthpod_bundle.ttl> . # Synthpod CV Source synthpod:cv_source a lv2:Plugin ; - lv2:minorVersion @SYNTHPOD_MINOR_VERSION@ ; - lv2:microVersion @SYNTHPOD_MICRO_VERSION@ ; - lv2:binary <synthpod_bundle@CMAKE_SHARED_MODULE_SUFFIX@> ; + lv2:minorVersion @MINOR_VERSION@ ; + lv2:microVersion @MICRO_VERSION@ ; + lv2:binary <synthpod_bundle@MODULE_SUFFIX@> ; rdfs:seeAlso <synthpod_bundle.ttl> . # Synthpod CV Sink synthpod:cv_sink a lv2:Plugin ; - lv2:minorVersion @SYNTHPOD_MINOR_VERSION@ ; - lv2:microVersion @SYNTHPOD_MICRO_VERSION@ ; - lv2:binary <synthpod_bundle@CMAKE_SHARED_MODULE_SUFFIX@> ; + lv2:minorVersion @MINOR_VERSION@ ; + lv2:microVersion @MICRO_VERSION@ ; + lv2:binary <synthpod_bundle@MODULE_SUFFIX@> ; rdfs:seeAlso <synthpod_bundle.ttl> . diff --git a/bundle/meson.build b/bundle/meson.build new file mode 100644 index 00000000..d1da20e4 --- /dev/null +++ b/bundle/meson.build @@ -0,0 +1,20 @@ +bndl_srcs = ['synthpod_bundle.c'] + +bndl = shared_module('synthpod_bundle', bndl_srcs, + c_args : c_args, + name_prefix : '', + dependencies : [m_dep, lv2_dep], + install : true, + install_dir : bndl_dir) + +configure_file(input : 'manifest.ttl.in', output : 'manifest.ttl', + configuration : conf_data, + install : true, + install_dir : bndl_dir) + +custom_target('synthpod_bundle_ttl', + input : 'synthpod_bundle.ttl', + output : 'synthpod_bundle.ttl', + command : clone, + install : true, + install_dir : bndl_dir) diff --git a/cmake/arm-linux-gnueabihf.cmake b/cmake/arm-linux-gnueabihf.cmake deleted file mode 100644 index 9873dadf..00000000 --- a/cmake/arm-linux-gnueabihf.cmake +++ /dev/null @@ -1,24 +0,0 @@ -# the name of the target operating system -set(CMAKE_SYSTEM_NAME Linux) -set(CMAKE_SYSTEM_PROCESSOR "armv7h") -set(TOOLCHAIN "arm-linux-gnueabihf") - -# which compilers to use for C and C++ -set(CMAKE_C_COMPILER "${TOOLCHAIN}-gcc") -set(CMAKE_CXX_COMPILER "${TOOLCHAIN}-g++") - -# here is the target environment located -set(CMAKE_FIND_ROOT_PATH "usr/${TOOLCHAIN}") - -# adjust the default behaviour of the FIND_XXX() commands: -# search headers and libraries in the target environment, search -# programs in the host environment -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) - -set(STATIC_LILV "/opt/${TOOLCHAIN}/lib/liblilv-0.a") -set(STATIC_SRATOM "/opt/${TOOLCHAIN}/lib/libsratom-0.a") -set(STATIC_SERD "/opt/${TOOLCHAIN}/lib/libserd-0.a") -set(STATIC_SORD "/opt/${TOOLCHAIN}/lib/libsord-0.a") -set(LIBS ${LIBS} dl m) diff --git a/cmake/i686-linux-gnu.cmake b/cmake/i686-linux-gnu.cmake deleted file mode 100644 index c6c800c2..00000000 --- a/cmake/i686-linux-gnu.cmake +++ /dev/null @@ -1,13 +0,0 @@ -# the name of the target operating system -set(CMAKE_SYSTEM_NAME Linux) -set(CMAKE_SYSTEM_PROCESSOR "i686") -set(TOOLCHAIN "i686-linux-gnu") - -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" CACHE STRING "c++ flags") -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32" CACHE STRING "c flags") - -set(STATIC_LILV "/opt/${TOOLCHAIN}/lib/liblilv-0.a") -set(STATIC_SRATOM "/opt/${TOOLCHAIN}/lib/libsratom-0.a") -set(STATIC_SERD "/opt/${TOOLCHAIN}/lib/libserd-0.a") -set(STATIC_SORD "/opt/${TOOLCHAIN}/lib/libsord-0.a") -set(LIBS ${LIBS} dl m) diff --git a/cmake/i686-w64-mingw32.cmake b/cmake/i686-w64-mingw32.cmake deleted file mode 100644 index 384811ab..00000000 --- a/cmake/i686-w64-mingw32.cmake +++ /dev/null @@ -1,27 +0,0 @@ -# the name of the target operating system -set(CMAKE_SYSTEM_NAME Windows) -set(CMAKE_SYSTEM_PROCESSOR "i686") -set(TOOLCHAIN "i686-w64-mingw32") - -# which compilers to use for C and C++ -set(CMAKE_C_COMPILER "${TOOLCHAIN}-gcc") -set(CMAKE_CXX_COMPILER "${TOOLCHAIN}-g++") -set(CMAKE_RC_COMPILER "${TOOLCHAIN}-windres") - -# here is the target environment located -set(CMAKE_FIND_ROOT_PATH "/usr/${TOOLCHAIN}") - -# adjust the default behaviour of the FIND_XXX() commands: -# search headers and libraries in the target environment, search -# programs in the host environment -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) - -set(STATIC_LILV "/opt/${TOOLCHAIN}/lib/liblilv-0.a") -set(STATIC_SRATOM "/opt/${TOOLCHAIN}/lib/libsratom-0.a") -set(STATIC_SERD "/opt/${TOOLCHAIN}/lib/libserd-0.a") -set(STATIC_SORD "/opt/${TOOLCHAIN}/lib/libsord-0.a") -set(LIBS ${LIBS} "-static-libgcc -Wl,-Bstatic -luserenv") - -set(WINE wine32) diff --git a/cmake/universal-apple-darwin.cmake b/cmake/universal-apple-darwin.cmake deleted file mode 100644 index 0546c987..00000000 --- a/cmake/universal-apple-darwin.cmake +++ /dev/null @@ -1,25 +0,0 @@ -# the name of the target operating system -set(CMAKE_SYSTEM_NAME Darwin) -set(CMAKE_SYSTEM_PROCESSOR "x86_64") -set(TOOLCHAIN "universal-apple-darwin") - -set(CMAKE_OSX_ARCHITECTURES "x86_64;i386") - -# which compilers to use for C and C++ -set(CMAKE_C_COMPILER "/usr/${TOOLCHAIN}/bin/x86_64-apple-darwin15-clang") -set(CMAKE_CXX_COMPILER "/usr/${TOOLCHAIN}/bin/x86_64-apple-darwin15-clang++") - -# here is the target environment located -set(CMAKE_FIND_ROOT_PATH "/usr/${TOOLCHAIN}") - -# adjust the default behaviour of the FIND_XXX() commands: -# search headers and libraries in the target environment, search -# programs in the host environment -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) - -set(STATIC_LILV "/opt/${TOOLCHAIN}/lib/liblilv-0.a") -set(STATIC_SRATOM "/opt/${TOOLCHAIN}/lib/libsratom-0.a") -set(STATIC_SERD "/opt/${TOOLCHAIN}/lib/libserd-0.a") -set(STATIC_SORD "/opt/${TOOLCHAIN}/lib/libsord-0.a") diff --git a/cmake/x86_64-linux-gnu.cmake b/cmake/x86_64-linux-gnu.cmake deleted file mode 100644 index 01e34a58..00000000 --- a/cmake/x86_64-linux-gnu.cmake +++ /dev/null @@ -1,10 +0,0 @@ -# the name of the target operating system -set(CMAKE_SYSTEM_NAME Linux) -set(CMAKE_SYSTEM_PROCESSOR "x86_64") -set(TOOLCHAIN "x86_64-linux-gnu") - -set(STATIC_LILV "/opt/${TOOLCHAIN}/lib/liblilv-0.a") -set(STATIC_SRATOM "/opt/${TOOLCHAIN}/lib/libsratom-0.a") -set(STATIC_SERD "/opt/${TOOLCHAIN}/lib/libserd-0.a") -set(STATIC_SORD "/opt/${TOOLCHAIN}/lib/libsord-0.a") -set(LIBS ${LIBS} dl m) diff --git a/cmake/x86_64-w64-mingw32.cmake b/cmake/x86_64-w64-mingw32.cmake deleted file mode 100644 index a569cd0a..00000000 --- a/cmake/x86_64-w64-mingw32.cmake +++ /dev/null @@ -1,27 +0,0 @@ -# the name of the target operating system -set(CMAKE_SYSTEM_NAME Windows) -set(CMAKE_SYSTEM_PROCESSOR "x86_64") -set(TOOLCHAIN "x86_64-w64-mingw32") - -# which compilers to use for C and C++ -set(CMAKE_C_COMPILER "${TOOLCHAIN}-gcc") -set(CMAKE_CXX_COMPILER "${TOOLCHAIN}-g++") -set(CMAKE_RC_COMPILER "${TOOLCHAIN}-windres") - -# here is the target environment located -set(CMAKE_FIND_ROOT_PATH "/usr/${TOOLCHAIN}") - -# adjust the default behaviour of the FIND_XXX() commands: -# search headers and libraries in the target environment, search -# programs in the host environment -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) - -set(STATIC_LILV "/opt/${TOOLCHAIN}/lib/liblilv-0.a") -set(STATIC_SRATOM "/opt/${TOOLCHAIN}/lib/libsratom-0.a") -set(STATIC_SERD "/opt/${TOOLCHAIN}/lib/libserd-0.a") -set(STATIC_SORD "/opt/${TOOLCHAIN}/lib/libsord-0.a") -set(LIBS ${LIBS} "-static-libgcc -Wl,-Bstatic -luserenv") - -set(WINE wine64) diff --git a/meson.build b/meson.build index 56e2c472..563891cb 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('synthpod', 'c', default_options : [ +project('synthpod', ['c', 'cpp'], default_options : [ 'buildtype=release', 'warning_level=1', 'werror=false', @@ -19,6 +19,9 @@ lfrtm_incs = include_directories('lfrtm') mapper_incs = include_directories('mapper.lv2') sbox_incs = include_directories('sandbox_ui.lv2') netatom_incs = include_directories('netatom.lv2') +props_incs = include_directories('props.lv2') +pugl_incs = include_directories('pugl') +self_incs = include_directories('') m_dep = cc.find_library('m') rt_dep = cc.find_library('rt') @@ -47,13 +50,29 @@ conf_data.set('MAJOR_VERSION', version[0]) conf_data.set('MINOR_VERSION', version[1]) conf_data.set('MICRO_VERSION', version[2]) +prefix = get_option('prefix') +bndl_dir = join_paths(get_option('libdir'), meson.project_name(), 'lv2') +plug_dir = join_paths(get_option('libdir'), 'lv2', meson.project_name()+'.lv2') + +message(prefix) +message(bndl_dir) +message(plug_dir) + add_project_arguments('-D_GNU_SOURCE', language : 'c') +add_project_arguments('-DPUGL_HAVE_GL', language : 'c') +add_project_arguments('-DSANDBOX_X11', language : 'c') #FIXME +add_project_arguments('-DSANDBOX_SHOW', language : 'c') #FIXME +add_project_arguments('-DSANDBOX_KX', language : 'c') #FIXME +add_project_arguments('-DSANDBOX_GTK2', language : 'c') #FIXME +add_project_arguments('-DSANDBOX_GTK3', language : 'c') #FIXME +add_project_arguments('-DSANDBOX_QT4', language : 'c') #FIXME +add_project_arguments('-DSANDBOX_QT5', language : 'c') #FIXME add_project_arguments('-DSYNTHPOD_VERSION="'+rawvers+'"', language : 'c') -add_project_arguments('-DSYNTHPOD_MINOR_VERSION="'+version[1]+'"', language : 'c') #FIXME -add_project_arguments('-DSYNTHPOD_MICRO_VERSION="'+version[2]+'"', language : 'c') #FIXME -add_project_arguments('-DSYNTHPOD_BUNDLE_DIR="/usr/local/lib/synthpod/"', language : 'c') #FIXME -add_project_arguments('-DSYNTHPOD_BIN_DIR="/usr/local/bin/"', language : 'c') #FIXME -add_project_arguments('-DSYNTHPOD_PLUGIN_DIR="/usr/local/lib/lv2/"', language : 'c') #FIXME +add_project_arguments('-DSYNTHPOD_MINOR_VERSION="'+version[1]+'"', language : 'c') +add_project_arguments('-DSYNTHPOD_MICRO_VERSION="'+version[2]+'"', language : 'c') +add_project_arguments('-DSYNTHPOD_BUNDLE_DIR="'+join_paths(prefix, bndl_dir, '')+'"', language : 'c') +add_project_arguments('-DSYNTHPOD_BIN_DIR="'+join_paths(prefix, get_option('bindir'), '')+'"', language : 'c') +add_project_arguments('-DSYNTHPOD_PLUGIN_DIR="'+join_paths(prefix, plug_dir, '')+'"', language : 'c') cp = find_program('cp') clone = [cp, '@INPUT@', '@OUTPUT@'] @@ -64,4 +83,5 @@ c_args = ['-fvisibility=hidden', subdir('sandbox_ui.lv2') subdir('app') subdir('bin') -#subdir('plugins') +subdir('plugins') +subdir('bundle') diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt deleted file mode 100644 index e044ca2c..00000000 --- a/plugins/CMakeLists.txt +++ /dev/null @@ -1,135 +0,0 @@ -# synthpod -add_library(synthpod.lv2 MODULE - synthpod_lv2.c - synthpod_keyboard.c - synthpod_cv2control.c - synthpod_control2cv.c - synthpod_midisplitter.c - synthpod_heavyload.c - synthpod_panic.c - synthpod_placeholder.c - synthpod_stereo.c - $<TARGET_OBJECTS:synthpod.lib>) -target_link_libraries(synthpod.lv2 - ${BIN_LIBS}) -target_link_libraries(synthpod.lv2 m) -set_target_properties(synthpod.lv2 PROPERTIES PREFIX "" OUTPUT_NAME "synthpod") -set_target_properties(synthpod.lv2 PROPERTIES POSITION_INDEPENDENT_CODE true) # -fPIC -set_target_properties(synthpod.lv2 PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${IPO_SUPPORTED}) # -flto -install(TARGETS synthpod.lv2 DESTINATION ${SYNTHPOD_PLUGIN_DIR}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/synthpod.ttl DESTINATION ${SYNTHPOD_PLUGIN_DIR}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/synthpod_ui.ttl DESTINATION ${SYNTHPOD_PLUGIN_DIR}) - -if(BUILD_UI) -# nk_pugl - if(WIN32) - set(NK_UI_TYPE "WindowsUI") - elseif(APPLE) - set(NK_UI_TYPE "CocoaUI") - else() - set(NK_UI_TYPE "X11UI") - endif() - set(LIBS_NK m) - - find_package(OpenGL) - if(${OPENGL_FOUND}) - set(LIBS_NK ${LIBS_NK} ${OPENGL_LIBRARIES}) - else() # try pkg-config - pkg_search_module(GL REQUIRED gl) - if(${GL_FOUND}) - set(LIBS_NK ${LIBS_NK} ${GL_LDFLAGS}) - else() - message(FATAL_ERROR "OpenGL not found") - endif() - endif() - add_definitions("-DPUGL_HAVE_GL") - - if(WIN32) - find_library(GDI32_LIBRARY NAMES gdi32) - if(GDI32_LIBRARY) - set(LIBS_NK ${LIBS_NK} ${GDI32_LIBRARY}) - else() - message(FATAL_ERROR "gdi32 library not found") - endif() - - find_library(USER32_LIBRARY NAMES user32) - if(USER32_LIBRARY) - set(LIBS_NK ${LIBS_NK} ${USER32_LIBRARY}) - else() - message(FATAL_ERROR "user32 library not found") - endif() - - set(TAR_NK ${TAR_NK} ${PROJECT_SOURCE_DIR}/pugl/pugl/pugl_win.cpp) - - elseif(APPLE) - find_library(COCOA_LIBRARY NAMES Cocoa) - if(COCOA_LIBRARY) - set(LIBS_NK ${LIBS_NK} ${COCOA_LIBRARY}) - else() - message(FATAL_ERROR "Cocoa framework not found") - endif() - - set(TAR_NK ${TAR_NK} ${PROJECT_SOURCE_DIR}pugl/pugl/pugl_osx.m) - - else() # GNU/Linux - pkg_search_module(X11 REQUIRED x11>=1.6) - include_directories(${X11_INCLUDE_DIRS}) - set(LIBS_NK ${LIBS_NK} ${X11_LDFLAGS}) - - pkg_search_module(XEXT REQUIRED xext>=1.3) - include_directories(${XEXT_INCLUDE_DIRS}) - set(LIBS_NK ${LIBS_NK} ${XEXT_LDFLAGS}) - - set(TAR_NK ${TAR_NK} ${PROJECT_SOURCE_DIR}/pugl/pugl/pugl_x11.c) - endif() - -# synthpod_nk - add_library(synthpod_nk.lv2 MODULE - synthpod_lv2_nk.c - synthpod_common_nk.c - synthpod_keyboard_nk.c - ${TAR_NK} - $<TARGET_OBJECTS:sandbox_master.lib>) - target_link_libraries(synthpod_nk.lv2 - ${LIBS_NK} - ${LILV_LDFLAGS} - rt pthread) - set_target_properties(synthpod_nk.lv2 PROPERTIES PREFIX "" OUTPUT_NAME "synthpod_nk") - set_target_properties(synthpod_nk.lv2 PROPERTIES POSITION_INDEPENDENT_CODE true) # -fPIC - set_target_properties(synthpod_nk.lv2 PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${IPO_SUPPORTED}) # -flto - install(TARGETS synthpod_nk.lv2 DESTINATION ${SYNTHPOD_PLUGIN_DIR}) - -# font - install(FILES ${PROJECT_SOURCE_DIR}/data/font/Abel-Regular.ttf DESTINATION ${SYNTHPOD_PLUGIN_DIR}) - - # icons - install(FILES ${PROJECT_SOURCE_DIR}/data/pix/audio.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) - install(FILES ${PROJECT_SOURCE_DIR}/data/pix/control.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) - install(FILES ${PROJECT_SOURCE_DIR}/data/pix/cv.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) - install(FILES ${PROJECT_SOURCE_DIR}/data/pix/event.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) - install(FILES ${PROJECT_SOURCE_DIR}/data/pix/event_inverted.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) - install(FILES ${PROJECT_SOURCE_DIR}/data/pix/atom.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) - install(FILES ${PROJECT_SOURCE_DIR}/data/pix/atom_inverted.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) - - install(FILES ${PROJECT_SOURCE_DIR}/data/pix/midi.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) - install(FILES ${PROJECT_SOURCE_DIR}/data/pix/osc.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) - install(FILES ${PROJECT_SOURCE_DIR}/data/pix/time.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) - install(FILES ${PROJECT_SOURCE_DIR}/data/pix/patch.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) - install(FILES ${PROJECT_SOURCE_DIR}/data/pix/xpress.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) - install(FILES ${PROJECT_SOURCE_DIR}/data/pix/automaton.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) - - install(FILES ${PROJECT_SOURCE_DIR}/data/png/plus.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) - install(FILES ${PROJECT_SOURCE_DIR}/data/png/download.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) - install(FILES ${PROJECT_SOURCE_DIR}/data/png/cancel.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) - install(FILES ${PROJECT_SOURCE_DIR}/data/png/house.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) - install(FILES ${PROJECT_SOURCE_DIR}/data/png/layers.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) - install(FILES ${PROJECT_SOURCE_DIR}/data/png/user.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) - install(FILES ${PROJECT_SOURCE_DIR}/data/png/settings.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) - install(FILES ${PROJECT_SOURCE_DIR}/data/png/menu.png DESTINATION ${SYNTHPOD_PLUGIN_DIR}) -else() - set(UI_WRAP "#") -endif() - -# manifest -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/manifest.ttl.in ${PROJECT_BINARY_DIR}/plugins/manifest.ttl) -install(FILES ${PROJECT_BINARY_DIR}/plugins/manifest.ttl DESTINATION ${SYNTHPOD_PLUGIN_DIR}) diff --git a/plugins/manifest.ttl.in b/plugins/manifest.ttl.in index 7522c85d..e34653ec 100644 --- a/plugins/manifest.ttl.in +++ b/plugins/manifest.ttl.in @@ -31,81 +31,81 @@ kx:Host # Synthpod Stereo synthpod:stereo a lv2:Plugin ; - lv2:minorVersion @SYNTHPOD_MINOR_VERSION@ ; - lv2:microVersion @SYNTHPOD_MICRO_VERSION@ ; - lv2:binary <synthpod@CMAKE_SHARED_MODULE_SUFFIX@> ; + lv2:minorVersion @MINOR_VERSION@ ; + lv2:microVersion @MICRO_VERSION@ ; + lv2:binary <synthpod@MODULE_SUFFIX@> ; @UI_WRAP@ui:ui synthpod:common_4_nk ; @UI_WRAP@ui:ui synthpod:root_4_nk ; #FIXME rdfs:seeAlso <synthpod.ttl> . synthpod:common_4_nk - a ui:@NK_UI_TYPE@ ; - ui:binary <synthpod_nk@CMAKE_SHARED_MODULE_SUFFIX@> ; + a ui:@UI_TYPE@ ; + ui:binary <synthpod_nk@MODULE_SUFFIX@> ; rdfs:seeAlso <synthpod_ui.ttl> . synthpod:root_4_nk - a ui:@NK_UI_TYPE@ ; - ui:binary <synthpod_nk@CMAKE_SHARED_MODULE_SUFFIX@> ; + a ui:@UI_TYPE@ ; + ui:binary <synthpod_nk@MODULE_SUFFIX@> ; rdfs:seeAlso <synthpod_ui.ttl> . # Synthpod Keyboard synthpod:keyboard a lv2:Plugin ; - lv2:minorVersion @SYNTHPOD_MINOR_VERSION@ ; - lv2:microVersion @SYNTHPOD_MICRO_VERSION@ ; - lv2:binary <synthpod@CMAKE_SHARED_MODULE_SUFFIX@> ; + lv2:minorVersion @MINOR_VERSION@ ; + lv2:microVersion @MICRO_VERSION@ ; + lv2:binary <synthpod@MODULE_SUFFIX@> ; @UI_WRAP@ui:ui synthpod:keyboard_4_nk ; rdfs:seeAlso <synthpod.ttl> . synthpod:keyboard_4_nk - a ui:@NK_UI_TYPE@ ; - ui:binary <synthpod_nk@CMAKE_SHARED_MODULE_SUFFIX@> ; + a ui:@UI_TYPE@ ; + ui:binary <synthpod_nk@MODULE_SUFFIX@> ; rdfs:seeAlso <synthpod_ui.ttl> . # CV2Control synthpod:cv2control a lv2:Plugin ; - lv2:minorVersion @SYNTHPOD_MINOR_VERSION@ ; - lv2:microVersion @SYNTHPOD_MICRO_VERSION@ ; - lv2:binary <synthpod@CMAKE_SHARED_MODULE_SUFFIX@> ; + lv2:minorVersion @MINOR_VERSION@ ; + lv2:microVersion @MICRO_VERSION@ ; + lv2:binary <synthpod@MODULE_SUFFIX@> ; rdfs:seeAlso <synthpod.ttl> . # Control2CV synthpod:control2cv a lv2:Plugin ; - lv2:minorVersion @SYNTHPOD_MINOR_VERSION@ ; - lv2:microVersion @SYNTHPOD_MICRO_VERSION@ ; - lv2:binary <synthpod@CMAKE_SHARED_MODULE_SUFFIX@> ; + lv2:minorVersion @MINOR_VERSION@ ; + lv2:microVersion @MICRO_VERSION@ ; + lv2:binary <synthpod@MODULE_SUFFIX@> ; rdfs:seeAlso <synthpod.ttl> . # MidiSplitter synthpod:midisplitter a lv2:Plugin ; - lv2:minorVersion @SYNTHPOD_MINOR_VERSION@ ; - lv2:microVersion @SYNTHPOD_MICRO_VERSION@ ; - lv2:binary <synthpod@CMAKE_SHARED_MODULE_SUFFIX@> ; + lv2:minorVersion @MINOR_VERSION@ ; + lv2:microVersion @MICRO_VERSION@ ; + lv2:binary <synthpod@MODULE_SUFFIX@> ; rdfs:seeAlso <synthpod.ttl> . # HeavyLoad synthpod:heavyload a lv2:Plugin ; - lv2:minorVersion @SYNTHPOD_MINOR_VERSION@ ; - lv2:microVersion @SYNTHPOD_MICRO_VERSION@ ; - lv2:binary <synthpod@CMAKE_SHARED_MODULE_SUFFIX@> ; + lv2:minorVersion @MINOR_VERSION@ ; + lv2:microVersion @MICRO_VERSION@ ; + lv2:binary <synthpod@MODULE_SUFFIX@> ; rdfs:seeAlso <synthpod.ttl> . # Panic synthpod:panic a lv2:Plugin ; - lv2:minorVersion @SYNTHPOD_MINOR_VERSION@ ; - lv2:microVersion @SYNTHPOD_MICRO_VERSION@ ; - lv2:binary <synthpod@CMAKE_SHARED_MODULE_SUFFIX@> ; + lv2:minorVersion @MINOR_VERSION@ ; + lv2:microVersion @MICRO_VERSION@ ; + lv2:binary <synthpod@MODULE_SUFFIX@> ; rdfs:seeAlso <synthpod.ttl> . # Placeholder synthpod:placeholder a lv2:Plugin ; - lv2:minorVersion @SYNTHPOD_MINOR_VERSION@ ; - lv2:microVersion @SYNTHPOD_MICRO_VERSION@ ; - lv2:binary <synthpod@CMAKE_SHARED_MODULE_SUFFIX@> ; + lv2:minorVersion @MINOR_VERSION@ ; + lv2:microVersion @MICRO_VERSION@ ; + lv2:binary <synthpod@MODULE_SUFFIX@> ; rdfs:seeAlso <synthpod.ttl> . diff --git a/plugins/meson.build b/plugins/meson.build new file mode 100644 index 00000000..e2da1ef0 --- /dev/null +++ b/plugins/meson.build @@ -0,0 +1,105 @@ +dsp_srcs = ['synthpod_lv2.c', + 'synthpod_control2cv.c', + 'synthpod_cv2control.c', + 'synthpod_heavyload.c', + 'synthpod_keyboard.c', + 'synthpod_midisplitter.c', + 'synthpod_panic.c', + 'synthpod_placeholder.c', + 'synthpod_stereo.c'] + +ui_deps = [m_dep, rt_dep, lv2_dep, lilv_dep] +ui_srcs = ['synthpod_lv2_nk.c', + 'synthpod_keyboard_nk.c', + 'synthpod_common_nk.c'] + +dsp = shared_module('synthpod', dsp_srcs, + c_args : c_args, + include_directories : bin_incs, + name_prefix : '', + dependencies : bin_deps, + link_with : [app, sbox_master], + install : true, + install_dir : plug_dir) + +suffix = dsp.full_path().strip().split('.')[-1] +conf_data.set('MODULE_SUFFIX', '.' + suffix) + +conf_data.set('UI_WRAP', '') #FIXME only build with enbaled UI + +if host_machine.system() == 'linux' + conf_data.set('UI_TYPE', 'X11UI') + ui_deps += gl_dep + ui_deps += x11_dep + ui_deps += xext_dep + ui_srcs += join_paths('..', 'pugl', 'pugl', 'pugl_x11.c') +elif host_machine.system() == 'windows' + add_languages('cpp') + conf_data.set('UI_TYPE', 'WindowsUI') + ui_deps += cc.find_library('opengl32') + ui_deps += cc.find_library('gdi32') + ui_deps += cc.find_library('user32') + ui_srcs += join_paths('..', 'pugl', 'pugl', 'pugl_win.cpp') +elif host_machine.system() == 'darwin' + #add_languages('objc') + conf_data.set('UI_TYPE', 'CocoaUI') + #ui_deps += cc.find_library('Cocoa') + #ui_deps += cc.find_library('gl') + #ui_deps += dependency('appleframeworks', modules : 'cocoa') + #ui_srcs += join_paths('..', 'pugl', 'pugl', 'pugl_osx.m') +endif + +ui = shared_module('synthpod_nk', ui_srcs, + c_args : c_args, + include_directories : bin_incs, + name_prefix : '', + dependencies : ui_deps, + link_with : [sbox_master], + install : true, + install_dir : plug_dir) + +configure_file(input : 'manifest.ttl.in', output : 'manifest.ttl', + configuration : conf_data, + install : true, + install_dir : plug_dir) + +custom_target('synthpod_ttl', + input : 'synthpod.ttl', + output : 'synthpod.ttl', + command : clone, + install : true, + install_dir : plug_dir) + +custom_target('synthpod_ui_ttl', + input : 'synthpod_ui.ttl', + output : 'synthpod_ui.ttl', + command : clone, + install : true, + install_dir : plug_dir) + +#FIXME paths +install_data('../data/font/Abel-Regular.ttf', install_dir : plug_dir) + +install_data('../data/pix/audio.png', install_dir : plug_dir ) +install_data('../data/pix/control.png', install_dir : plug_dir ) +install_data('../data/pix/cv.png', install_dir : plug_dir ) +install_data('../data/pix/event.png', install_dir : plug_dir ) +install_data('../data/pix/event_inverted.png', install_dir : plug_dir ) +install_data('../data/pix/atom.png', install_dir : plug_dir ) +install_data('../data/pix/atom_inverted.png', install_dir : plug_dir ) + +install_data('../data/pix/midi.png', install_dir : plug_dir ) +install_data('../data/pix/osc.png', install_dir : plug_dir ) +install_data('../data/pix/time.png', install_dir : plug_dir ) +install_data('../data/pix/patch.png', install_dir : plug_dir ) +install_data('../data/pix/xpress.png', install_dir : plug_dir ) +install_data('../data/pix/automaton.png', install_dir : plug_dir ) + +install_data('../data/png/plus.png', install_dir : plug_dir ) +install_data('../data/png/download.png', install_dir : plug_dir ) +install_data('../data/png/cancel.png', install_dir : plug_dir ) +install_data('../data/png/house.png', install_dir : plug_dir ) +install_data('../data/png/layers.png', install_dir : plug_dir ) +install_data('../data/png/user.png', install_dir : plug_dir ) +install_data('../data/png/settings.png', install_dir : plug_dir ) +install_data('../data/png/menu.png', install_dir : plug_dir ) diff --git a/plugins/synthpod_common_nk.c b/plugins/synthpod_common_nk.c index f34453f1..a559ba24 100644 --- a/plugins/synthpod_common_nk.c +++ b/plugins/synthpod_common_nk.c @@ -7348,7 +7348,7 @@ _init(plughandle_t *handle) lilv_node_free(node_false); } lilv_world_load_all(handle->world); - LilvNode *synthpod_bundle = lilv_new_file_uri(handle->world, NULL, SYNTHPOD_BUNDLE_DIR"/"); + LilvNode *synthpod_bundle = lilv_new_file_uri(handle->world, NULL, SYNTHPOD_BUNDLE_DIR); if(synthpod_bundle) { lilv_world_load_bundle(handle->world, synthpod_bundle); diff --git a/plugins/synthpod_keyboard_nk.c b/plugins/synthpod_keyboard_nk.c index e618c0cb..fee95747 100644 --- a/plugins/synthpod_keyboard_nk.c +++ b/plugins/synthpod_keyboard_nk.c @@ -24,7 +24,7 @@ #include <math.h> #define NK_PUGL_API -#include "nk_pugl/nk_pugl.h" +#include <nk_pugl/nk_pugl.h> typedef struct _midi_atom_t midi_atom_t; typedef struct _plughandle_t plughandle_t; diff --git a/plugins/synthpod_lv2_nk.c b/plugins/synthpod_lv2_nk.c index 780a4580..4d24c8bb 100644 --- a/plugins/synthpod_lv2_nk.c +++ b/plugins/synthpod_lv2_nk.c @@ -21,7 +21,7 @@ #define NK_PUGL_IMPLEMENTATION #define NK_PUGL_API -#include "nk_pugl/nk_pugl.h" +#include <nk_pugl/nk_pugl.h> #ifdef _WIN32 __declspec(dllexport) diff --git a/props.lv2/CMakeLists.txt b/props.lv2/CMakeLists.txt deleted file mode 100644 index 2fff6f06..00000000 --- a/props.lv2/CMakeLists.txt +++ /dev/null @@ -1,41 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -project(props.lv2) - -include_directories(${PROJECT_SOURCE_DIR}) -include_directories(${PROJECT_BINARY_DIR}) - -set(CMAKE_C_FLAGS "-std=gnu99 -Wextra -Wno-unused-parameter -ffast-math -fvisibility=hidden ${CMAKE_C_FLAGS}") -set(CMAKE_C_FLAGS "-Wshadow -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes ${CMAKE_C_FLAGS}") -set(CMAKE_MODULE_LINKER_FLAGS "-Wl,-z,nodelete ${CMAKE_MODULE_LINKER_FLAGS}") -add_definitions("-D_GNU_SOURCE=1") # asprintf - -set(PROPS_MAJOR_VERSION 0) -set(PROPS_MINOR_VERSION 1) -set(PROPS_MICRO_VERSION 1) -set(PROPS_VERSION "${PROPS_MAJOR_VERSION}.${PROPS_MINOR_VERSION}.${PROPS_MICRO_VERSION}") -add_definitions("-DPROPS_VERSION=\"${PROPS_VERSION}\"") - -set(DEST lib/lv2/props.lv2) -if(WIN32) - set(LIB_EXT ".dll") -elseif(APPLE) - set(LIB_EXT ".so") -else() - set(LIB_EXT ".so") -endif() - -find_package(PkgConfig) # ${PKG_CONFIG_FOUND} - -# props -add_library(props MODULE - test/props.c) -target_link_libraries(props ${LIBS}) -set_target_properties(props PROPERTIES PREFIX "") -install(TARGETS props DESTINATION ${DEST}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/test/props.ttl DESTINATION ${DEST}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/test/chunk.bin DESTINATION ${DEST}) - -# manifest -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/test/manifest.ttl.in ${PROJECT_BINARY_DIR}/manifest.ttl) -install(FILES ${PROJECT_BINARY_DIR}/manifest.ttl DESTINATION ${DEST}) diff --git a/sandbox_ui.lv2/CMakeLists.txt b/sandbox_ui.lv2/CMakeLists.txt deleted file mode 100644 index 2c7665fa..00000000 --- a/sandbox_ui.lv2/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# sandbox_slave -add_library(sandbox_slave.lib OBJECT - sandbox_slave.c) -set_target_properties(sandbox_slave.lib PROPERTIES POSITION_INDEPENDENT_CODE true) # -fPIC -set_target_properties(sandbox_slave.lib PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${IPO_SUPPORTED}) # -flto - -# sandbox_master -add_library(sandbox_master.lib OBJECT - sandbox_master.c) -set_target_properties(sandbox_master.lib PROPERTIES POSITION_INDEPENDENT_CODE true) # -fPIC -set_target_properties(sandbox_master.lib PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${IPO_SUPPORTED}) # -flto diff --git a/varchunk/CMakeLists.txt b/varchunk/CMakeLists.txt deleted file mode 100644 index 949dddd7..00000000 --- a/varchunk/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -project(varchunk) - -set(CMAKE_C_FLAGS "-std=gnu11 -Wextra -Wno-unused-parameter -ffast-math -fvisibility=hidden ${CMAKE_C_FLAGS}") -set(CMAKE_C_FLAGS "-Wshadow -Wimplicit-function-declaration -Wmissing-prototypes -Wstrict-prototypes ${CMAKE_C_FLAGS}") - -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) - -# find pthreads -set(THREADS_PREFER_PTHREAD_FLAG ON) -find_package(Threads REQUIRED) - -include(CTest) -if(${BUILD_TESTING}) - add_executable(test_varchunk - test_varchunk.c) - target_link_libraries(test_varchunk ${CMAKE_THREAD_LIBS_INIT} rt) - - add_test(API-Test test_varchunk) -endif() diff --git a/xpress.lv2/CMakeLists.txt b/xpress.lv2/CMakeLists.txt deleted file mode 100644 index 9a9ae0fc..00000000 --- a/xpress.lv2/CMakeLists.txt +++ /dev/null @@ -1,52 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -project(xpress.lv2) - -include_directories(${PROJECT_SOURCE_DIR}) -include_directories(${PROJECT_BINARY_DIR}) - -set(CMAKE_C_FLAGS "-fdata-sections -ffunction-sections ${CMAKE_C_FLAGS}") -set(CMAKE_C_FLAGS "-std=gnu11 -Wextra -Wno-unused-parameter -ffast-math -fvisibility=hidden ${CMAKE_C_FLAGS}") -set(CMAKE_C_FLAGS "-Wshadow -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes ${CMAKE_C_FLAGS}") - -if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") - set(CMAKE_MODULE_LINKER_FLAGS "-Wl,-z,defs ${CMAKE_MODULE_LINKER_FLAGS}") - set(CMAKE_MODULE_LINKER_FLAGS "-Wl,-z,nodelete ${CMAKE_MODULE_LINKER_FLAGS}") -elseif(WIN32) - set(CMAKE_C_FLAGS "-mstackrealign ${CMAKE_C_FLAGS}") -endif() - -if(APPLE) - set(CMAKE_MODULE_LINKER_FLAGS "-Wl,-dead_strip ${CMAKE_MODULE_LINKER_FLAGS}") -else() - set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--gc-sections -Wl,-s ${CMAKE_MODULE_LINKER_FLAGS}") -endif() - -set(XPRESS_MAJOR_VERSION 0) -set(XPRESS_MINOR_VERSION 1) -set(XPRESS_MICRO_VERSION 1) -set(XPRESS_VERSION "${XPRESS_MAJOR_VERSION}.${XPRESS_MINOR_VERSION}.${XPRESS_MICRO_VERSION}") -add_definitions("-DXPRESS_VERSION=\"${XPRESS_VERSION}\"") - -set(DEST lib/lv2/xpress.lv2) -if(WIN32) - set(LIB_EXT ".dll") -elseif(APPLE) - set(LIB_EXT ".so") -else() - set(LIB_EXT ".so") -endif() - -find_package(PkgConfig) # ${PKG_CONFIG_FOUND} - -# xpress -add_library(xpress MODULE - test/xpress.c) -target_link_libraries(xpress ${LIBS}) -set_target_properties(xpress PROPERTIES PREFIX "") -install(TARGETS xpress DESTINATION ${DEST}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/test/xpress.ttl DESTINATION ${DEST}) - -# manifest -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/test/manifest.ttl.in ${PROJECT_BINARY_DIR}/manifest.ttl) -install(FILES ${PROJECT_BINARY_DIR}/manifest.ttl DESTINATION ${DEST}) |