Skip to content

Commit

Permalink
suil: only create target if lv2 is there
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Dec 27, 2024
1 parent bb90c91 commit 9309d85
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
11 changes: 9 additions & 2 deletions 3rdparty/suil.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ if(OSSIA_USE_SYSTEM_LIBRARIES)
return()
endif()

if(NOT LV2_PATH)
return()
endif()

set(Suil_INCLUDE_DIR "${3RDPARTY_FOLDER}/suil/include")

add_library(Suil SHARED
Expand All @@ -18,8 +22,11 @@ set_target_properties(Suil PROPERTIES
target_compile_definitions(Suil PRIVATE "SUIL_MODULE_DIR=\"${CMAKE_BINARY_DIR}/lib/suil-0\"")

target_include_directories(Suil
PUBLIC "${Suil_INCLUDE_DIR}"
PRIVATE "${3RDPARTY_FOLDER}/suil/src"
PUBLIC
"${Suil_INCLUDE_DIR}"
PRIVATE
"${3RDPARTY_FOLDER}/suil/src"
"${LV2_PATH}"
)

add_library(suil_x11_in_qt6 MODULE
Expand Down
9 changes: 7 additions & 2 deletions src/plugins/score-plugin-lv2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,18 @@ if(SCORE_FAST_DEV_BUILD)
return()
endif()

find_package(Lilv)
find_package(Suil)
find_path(LV2_PATH lv2/lv2plug.in/ns/ext/atom/atom.h
HINTS
"${OSSIA_SDK}/lv2/include"
)

find_package(Lilv)
if(NOT TARGET Lilv)
return()
endif()

find_package(Suil)

if(NOT TARGET Lilv OR NOT TARGET Suil OR NOT LV2_PATH)
return()
endif()
Expand Down

0 comments on commit 9309d85

Please sign in to comment.