LV2 CMake clean up plus Windows settings
This commit is contained in:
parent
e481089989
commit
199c14ea54
4 changed files with 18 additions and 21 deletions
|
|
@ -8,9 +8,6 @@ include (SfizzConfig)
|
|||
# Build Options
|
||||
set (BUILD_TESTING OFF CACHE BOOL "Disable Abseil's tests [default: OFF]")
|
||||
|
||||
set (LV2PLUGIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib/lv2" CACHE STRING
|
||||
"Install destination for LV2 bundle [default: ${CMAKE_INSTALL_PREFIX}/lib/lv2]")
|
||||
|
||||
# On macOS add the needed directories for both library and jack client
|
||||
if (APPLE)
|
||||
include_directories (SYSTEM /usr/local/opt/libsndfile/include)
|
||||
|
|
|
|||
|
|
@ -7,3 +7,11 @@ set (LV2PLUGIN_COMMENT "SFZ sampler")
|
|||
set (LV2PLUGIN_URI "http://sfztools.github.io/sfizz")
|
||||
set (LV2PLUGIN_AUTHOR "Paul Ferrand")
|
||||
set (LV2PLUGIN_SPDX_LICENSE_ID "ISC")
|
||||
|
||||
if (WIN32)
|
||||
set (LV2PLUGIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lv2" CACHE STRING
|
||||
"Install destination for LV2 bundle [default: ${CMAKE_INSTALL_PREFIX}/lv2}]")
|
||||
else()
|
||||
set (LV2PLUGIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib/lv2" CACHE STRING
|
||||
"Install destination for LV2 bundle [default: ${CMAKE_INSTALL_PREFIX}/lib/lv2}]")
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -6,14 +6,6 @@ set (PROJECT_BINARY_DIR "${PROJECT_BINARY_DIR}/${PROJECT_NAME}.lv2")
|
|||
# LV2 plugin specific settings
|
||||
include (LV2Config)
|
||||
|
||||
if (WIN32)
|
||||
set (LV2PLUGIN_EXT "dll")
|
||||
elseif (APPLE)
|
||||
set (LV2PLUGIN_EXT "dylib")
|
||||
else()
|
||||
set (LV2PLUGIN_EXT "so")
|
||||
endif()
|
||||
|
||||
# Keep non build turtle files in IDE
|
||||
set (LV2PLUGIN_TTL_SRC_FILES
|
||||
manifest.ttl.in
|
||||
|
|
@ -23,19 +15,19 @@ add_library (${LV2PLUGIN_PRJ_NAME} SHARED ${PROJECT_NAME}.c ${LV2PLUGIN_TTL_SRC_
|
|||
target_link_libraries (${LV2PLUGIN_PRJ_NAME} ${PROJECT_NAME}::${PROJECT_NAME})
|
||||
|
||||
# Fetch required LV2 include files
|
||||
include(FetchContent)
|
||||
include (FetchContent)
|
||||
FetchContent_Declare(
|
||||
lv2
|
||||
GIT_REPOSITORY https://gitlab.com/lv2/lv2.git
|
||||
GIT_TAG v1.16.0
|
||||
lv2
|
||||
GIT_REPOSITORY https://gitlab.com/lv2/lv2.git
|
||||
GIT_TAG v1.16.0
|
||||
)
|
||||
FetchContent_GetProperties(lv2)
|
||||
if(NOT lv2_POPULATED)
|
||||
FetchContent_Populate(lv2)
|
||||
target_include_directories(${LV2PLUGIN_PRJ_NAME} PRIVATE ${lv2_SOURCE_DIR})
|
||||
if (NOT lv2_POPULATED)
|
||||
FetchContent_Populate (lv2)
|
||||
target_include_directories (${LV2PLUGIN_PRJ_NAME} PRIVATE ${lv2_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
sfizz_enable_lto_if_needed(${LV2PLUGIN_PRJ_NAME})
|
||||
sfizz_enable_lto_if_needed (${LV2PLUGIN_PRJ_NAME})
|
||||
|
||||
# Remove the "lib" prefix, rename the target name and build it in the .lv build dir
|
||||
# <build_dir>/lv2/<plugin_name>_lv2.<ext> to
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@
|
|||
|
||||
<@LV2PLUGIN_URI@>
|
||||
a lv2:Plugin ;
|
||||
lv2:binary <@CMAKE_PROJECT_NAME@.@LV2PLUGIN_EXT@> ;
|
||||
rdfs:seeAlso <@CMAKE_PROJECT_NAME@.ttl> .
|
||||
lv2:binary <@PROJECT_NAME@@CMAKE_SHARED_LIBRARY_SUFFIX@> ;
|
||||
rdfs:seeAlso <@PROJECT_NAME@.ttl> .
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue