Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions 3rdparty/3rdparty.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
include(3rdparty/libossia.cmake)

add_subdirectory(3rdparty/QCodeEditor)
disable_qt_plugins(QCodeEditor)
score_use_system(use_sys QCodeEditor)
if(use_sys)
find_package(QCodeEditor GLOBAL QUIET)
endif()
if(NOT TARGET QCodeEditor)
add_subdirectory(3rdparty/QCodeEditor)
disable_qt_plugins(QCodeEditor)
endif()

function(disable_var VAR)
if(${${VAR}})
Expand All @@ -18,6 +24,10 @@ function(restore_var VAR)
endif()
endfunction()

include(3rdparty/outcome.cmake)
include(3rdparty/quickcpplib.cmake)
include(3rdparty/llfio.cmake)
include(3rdparty/phantomstyle.cmake)
include(3rdparty/dspfilters.cmake)
include(3rdparty/eigen.cmake)
include(3rdparty/gamma.cmake)
Expand Down
16 changes: 16 additions & 0 deletions 3rdparty/dspfilters.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
score_use_system(use_sys DSPFilters)
if(use_sys)
find_package(DSPFilters GLOBAL QUIET)
if(NOT TARGET dspfilters)
find_library(DSPFILTERS_LIBRARY NAMES DSPFilters dspfilters)
find_path(DSPFILTERS_INCLUDE_DIR DspFilters/Dsp.h)
if(DSPFILTERS_LIBRARY AND DSPFILTERS_INCLUDE_DIR)
add_library(dspfilters INTERFACE IMPORTED GLOBAL)
target_include_directories(dspfilters SYSTEM INTERFACE "${DSPFILTERS_INCLUDE_DIR}")
target_link_libraries(dspfilters INTERFACE "${DSPFILTERS_LIBRARY}")
endif()
endif()
endif()

if(NOT TARGET dspfilters)
add_library(dspfilters
"${CMAKE_CURRENT_LIST_DIR}/DSPFilters/DSPFilters/source/Bessel.cpp"
"${CMAKE_CURRENT_LIST_DIR}/DSPFilters/DSPFilters/source/Biquad.cpp"
Expand Down Expand Up @@ -30,3 +45,4 @@ target_include_directories(
SYSTEM PUBLIC
"${CMAKE_CURRENT_LIST_DIR}/DSPFilters/DSPFilters/include"
)
endif()
3 changes: 2 additions & 1 deletion 3rdparty/eigen.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
if(SCORE_USE_SYSTEM_LIBRARIES)
score_use_system(use_sys eigen)
if(use_sys)
find_package(eigen 3.4 GLOBAL CONFIG)
endif()

Expand Down
15 changes: 15 additions & 0 deletions 3rdparty/gamma.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
score_use_system(use_sys Gamma)
if(use_sys)
find_package(Gamma GLOBAL QUIET)
if(NOT TARGET gamma)
find_library(GAMMA_LIBRARY NAMES Gamma gamma)
find_path(GAMMA_INCLUDE_DIR Gamma/Gamma.h)
if(GAMMA_LIBRARY AND GAMMA_INCLUDE_DIR)
add_library(gamma INTERFACE IMPORTED GLOBAL)
target_include_directories(gamma SYSTEM INTERFACE "${GAMMA_INCLUDE_DIR}")
target_link_libraries(gamma INTERFACE "${GAMMA_LIBRARY}")
endif()
endif()
endif()

if(NOT TARGET gamma)
add_library(gamma STATIC
"${CMAKE_CURRENT_LIST_DIR}/Gamma/src/Conversion.cpp"
# "${CMAKE_CURRENT_LIST_DIR}/Gamma/src/DFT.cpp"
Expand All @@ -14,3 +28,4 @@ target_include_directories(
PUBLIC
"${CMAKE_CURRENT_LIST_DIR}/Gamma"
)
endif()
13 changes: 13 additions & 0 deletions 3rdparty/gist.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
add_library(Gist STATIC
"${CMAKE_CURRENT_LIST_DIR}/Gist/src/CoreFrequencyDomainFeatures.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Gist/src/CoreTimeDomainFeatures.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Gist/src/Gist.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Gist/src/MFCC.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Gist/src/OnsetDetectionFunction.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Gist/src/WindowFunctions.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Gist/src/Yin.cpp"
)
target_compile_definitions(Gist PUBLIC USE_OSSIA_FFT=1)
target_include_directories(Gist SYSTEM PUBLIC "${CMAKE_CURRENT_LIST_DIR}/Gist/src")
target_link_libraries(Gist PUBLIC ossia)
set_target_properties(Gist PROPERTIES UNITY_BUILD 0)
3 changes: 2 additions & 1 deletion 3rdparty/libpd.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
if(OSSIA_USE_SYSTEM_LIBRARIES AND LINUX)
score_use_system(use_sys libpd)
if(use_sys AND LINUX)
find_library(LIBPD_LIBRARY
NAMES pd
)
Expand Down
13 changes: 12 additions & 1 deletion 3rdparty/libsimpleio.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
score_use_system(use_sys simpleio)
if(use_sys)
find_library(SIMPLEIO_LIBRARY NAMES simpleio)
find_path(SIMPLEIO_INCLUDE_DIR libsimpleio/libgpio.h)
if(SIMPLEIO_LIBRARY AND SIMPLEIO_INCLUDE_DIR)
add_library(simpleio INTERFACE IMPORTED GLOBAL)
target_include_directories(simpleio SYSTEM INTERFACE "${SIMPLEIO_INCLUDE_DIR}")
target_link_libraries(simpleio INTERFACE "${SIMPLEIO_LIBRARY}")
endif()
endif()

find_path(LINUX_HEADERS_INCLUDE_DIR linux/gpio.h)
if(LINUX_HEADERS_INCLUDE_DIR AND UNIX AND NOT APPLE AND NOT EMSCRIPTEN)
if(NOT TARGET simpleio AND LINUX_HEADERS_INCLUDE_DIR AND UNIX AND NOT APPLE AND NOT EMSCRIPTEN)
add_library(simpleio STATIC
"${CMAKE_CURRENT_LIST_DIR}/libsimpleio/libsimpleio/cplusplus.h"
"${CMAKE_CURRENT_LIST_DIR}/libsimpleio/libsimpleio/errmsg.c"
Expand Down
17 changes: 17 additions & 0 deletions 3rdparty/llfio.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
score_use_system(use_sys llfio)
set(LLFIO_INC "${CMAKE_CURRENT_LIST_DIR}/llfio/include")
if(use_sys)
find_path(LLFIO_INCLUDE_DIR llfio/llfio.hpp)
if(LLFIO_INCLUDE_DIR)
set(LLFIO_INC "${LLFIO_INCLUDE_DIR}")
endif()
endif()

if(NOT TARGET llfio)
add_library(llfio INTERFACE IMPORTED GLOBAL)
target_include_directories(llfio SYSTEM INTERFACE "${LLFIO_INC}")
if(WIN32 AND NOT use_sys)
target_include_directories(llfio SYSTEM INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/llfio/include/llfio/ntkernel-error-category/include")
endif()
endif()
16 changes: 16 additions & 0 deletions 3rdparty/mikktspace.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
score_use_system(use_sys mikktspace)
if(use_sys)
find_path(MIKKTSPACE_INCLUDE_DIR mikktspace.h)
find_library(MIKKTSPACE_LIBRARY NAMES mikktspace)
if(MIKKTSPACE_INCLUDE_DIR AND MIKKTSPACE_LIBRARY)
add_library(mikktspace INTERFACE IMPORTED GLOBAL)
target_include_directories(mikktspace SYSTEM INTERFACE "${MIKKTSPACE_INCLUDE_DIR}")
target_link_libraries(mikktspace INTERFACE "${MIKKTSPACE_LIBRARY}")
endif()
endif()

if(NOT TARGET mikktspace)
add_library(mikktspace STATIC "${CMAKE_CURRENT_LIST_DIR}/mikktspace/mikktspace.c")
target_include_directories(mikktspace SYSTEM PUBLIC "${CMAKE_CURRENT_LIST_DIR}/mikktspace")
set_target_properties(mikktspace PROPERTIES UNITY_BUILD 0)
endif()
3 changes: 2 additions & 1 deletion 3rdparty/mimalloc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ if("${CMAKE_CXX_FLAGS}" MATCHES ".*_GLIBCXX_ASSERTIONS.*")
return()
endif()

if(SCORE_USE_SYSTEM_LIBRARIES)
score_use_system(use_sys snmalloc)
if(use_sys)
find_package(snmalloc GLOBAL CONFIG)
else()
block()
Expand Down
16 changes: 16 additions & 0 deletions 3rdparty/miniply.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
score_use_system(use_sys miniply)
if(use_sys)
find_path(MINIPLY_INCLUDE_DIR miniply.h)
find_library(MINIPLY_LIBRARY NAMES miniply)
if(MINIPLY_INCLUDE_DIR AND MINIPLY_LIBRARY)
add_library(miniply INTERFACE IMPORTED GLOBAL)
target_include_directories(miniply SYSTEM INTERFACE "${MINIPLY_INCLUDE_DIR}")
target_link_libraries(miniply INTERFACE "${MINIPLY_LIBRARY}")
endif()
endif()

if(NOT TARGET miniply)
add_library(miniply STATIC "${CMAKE_CURRENT_LIST_DIR}/miniply/miniply.cpp")
target_include_directories(miniply SYSTEM PUBLIC "${CMAKE_CURRENT_LIST_DIR}/miniply")
set_target_properties(miniply PROPERTIES UNITY_BUILD 0)
endif()
13 changes: 13 additions & 0 deletions 3rdparty/opengametools.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
score_use_system(use_sys opengametools)
set(OPENGAMETOOLS_INC "${CMAKE_CURRENT_LIST_DIR}/opengametools/src")
if(use_sys)
find_path(OPENGAMETOOLS_INCLUDE_DIR ogt_vox.h)
if(OPENGAMETOOLS_INCLUDE_DIR)
set(OPENGAMETOOLS_INC "${OPENGAMETOOLS_INCLUDE_DIR}")
endif()
endif()

if(NOT TARGET opengametools)
add_library(opengametools INTERFACE IMPORTED GLOBAL)
target_include_directories(opengametools SYSTEM INTERFACE "${OPENGAMETOOLS_INC}")
endif()
13 changes: 13 additions & 0 deletions 3rdparty/outcome.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
score_use_system(use_sys outcome)
set(OUTCOME_INC "${CMAKE_CURRENT_LIST_DIR}/outcome/include")
if(use_sys)
find_path(OUTCOME_INCLUDE_DIR outcome/outcome.hpp)
if(OUTCOME_INCLUDE_DIR)
set(OUTCOME_INC "${OUTCOME_INCLUDE_DIR}")
endif()
endif()

if(NOT TARGET outcome)
add_library(outcome INTERFACE IMPORTED GLOBAL)
target_include_directories(outcome SYSTEM INTERFACE "${OUTCOME_INC}")
endif()
9 changes: 9 additions & 0 deletions 3rdparty/phantomstyle.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
add_library(phantomstyle STATIC
"${CMAKE_CURRENT_LIST_DIR}/phantomstyle/src/phantom/phantomcolor.cpp"
"${CMAKE_CURRENT_LIST_DIR}/phantomstyle/src/phantom/phantomstyle.cpp"
)
target_include_directories(phantomstyle SYSTEM PUBLIC
"${CMAKE_CURRENT_LIST_DIR}/phantomstyle/src")
target_link_libraries(phantomstyle PUBLIC
${QT_PREFIX}::Core ${QT_PREFIX}::Gui ${QT_PREFIX}::Widgets)
set_target_properties(phantomstyle PROPERTIES UNITY_BUILD 0)
13 changes: 13 additions & 0 deletions 3rdparty/quickcpplib.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
score_use_system(use_sys quickcpplib)
set(QUICKCPPLIB_INC "${CMAKE_CURRENT_LIST_DIR}/quickcpplib/include")
if(use_sys)
find_path(QUICKCPPLIB_INCLUDE_DIR quickcpplib/config.hpp)
if(QUICKCPPLIB_INCLUDE_DIR)
set(QUICKCPPLIB_INC "${QUICKCPPLIB_INCLUDE_DIR}")
endif()
endif()

if(NOT TARGET quickcpplib)
add_library(quickcpplib INTERFACE IMPORTED GLOBAL)
target_include_directories(quickcpplib SYSTEM INTERFACE "${QUICKCPPLIB_INC}")
endif()
16 changes: 16 additions & 0 deletions 3rdparty/r8brain.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
score_use_system(use_sys r8brain)
if(use_sys)
find_package(r8brain GLOBAL QUIET)
if(NOT TARGET r8brain)
find_library(R8BRAIN_LIBRARY NAMES r8brain)
find_path(R8BRAIN_INCLUDE_DIR CDSPResampler.h PATH_SUFFIXES r8brain)
if(R8BRAIN_LIBRARY AND R8BRAIN_INCLUDE_DIR)
add_library(r8brain INTERFACE IMPORTED GLOBAL)
target_include_directories(r8brain SYSTEM INTERFACE "${R8BRAIN_INCLUDE_DIR}")
target_link_libraries(r8brain INTERFACE "${R8BRAIN_LIBRARY}")
endif()
endif()
endif()

if(NOT TARGET r8brain)
add_library(r8brain STATIC
"${CMAKE_CURRENT_LIST_DIR}/libossia/3rdparty/r8brain-free-src/r8bbase.cpp"
)
Expand All @@ -13,3 +28,4 @@ target_include_directories(
PUBLIC
"${CMAKE_CURRENT_LIST_DIR}/libossia/3rdparty/r8brain-free-src/"
)
endif()
7 changes: 5 additions & 2 deletions 3rdparty/sh4lt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ if(EMSCRIPTEN OR BSD)
return()
endif()

if(SCORE_USE_SYSTEM_LIBRARIES)
score_use_system(use_sys sh4lt)
if(use_sys)
find_package(sh4lt GLOBAL)
else()
endif()

if(NOT TARGET sh4lt)
add_library(sh4lt STATIC
"${CMAKE_CURRENT_LIST_DIR}/sh4lt/sh4lt/c/cfollower.cpp"
"${CMAKE_CURRENT_LIST_DIR}/sh4lt/sh4lt/c/clogger.cpp"
Expand Down
7 changes: 5 additions & 2 deletions 3rdparty/shmdata.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ if(EMSCRIPTEN OR BSD)
return()
endif()

if(SCORE_USE_SYSTEM_LIBRARIES)
score_use_system(use_sys shmdata)
if(use_sys)
find_package(shmdata GLOBAL)
else()
endif()

if(NOT TARGET shmdata)
add_library(shmdata STATIC
"${CMAKE_CURRENT_LIST_DIR}/shmdata/shmdata/cfollower.cpp"
"${CMAKE_CURRENT_LIST_DIR}/shmdata/shmdata/clogger.cpp"
Expand Down
7 changes: 5 additions & 2 deletions 3rdparty/snappy.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
if(SCORE_USE_SYSTEM_LIBRARIES)
score_use_system(use_sys Snappy)
if(use_sys)
find_package(Snappy GLOBAL CONFIG)
else()
endif()

if(NOT TARGET Snappy::snappy AND NOT TARGET snappy)
set(SNAPPY_BUILD_TESTS OFF)
set(SNAPPY_BUILD_BENCHMARKS OFF)
set(SNAPPY_INSTALL OFF)
Expand Down
3 changes: 2 additions & 1 deletion 3rdparty/sndfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ if(EMSCRIPTEN)
return()
endif()

if(SCORE_USE_SYSTEM_LIBRARIES)
score_use_system(use_sys SndFile)
if(use_sys)
find_package(SndFile GLOBAL CONFIG)
if(NOT TARGET SndFile::sndfile)
if(NOT TARGET sndfile)
Expand Down
29 changes: 29 additions & 0 deletions 3rdparty/ssynth.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
add_library(
ssynth STATIC
"${CMAKE_CURRENT_LIST_DIR}/libssynth/src/ssynth/Parser/EisenParser.cpp"
"${CMAKE_CURRENT_LIST_DIR}/libssynth/src/ssynth/Parser/Preprocessor.cpp"
"${CMAKE_CURRENT_LIST_DIR}/libssynth/src/ssynth/Parser/Tokenizer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/libssynth/src/ssynth/Model/Action.cpp"
"${CMAKE_CURRENT_LIST_DIR}/libssynth/src/ssynth/Model/AmbiguousRule.cpp"
"${CMAKE_CURRENT_LIST_DIR}/libssynth/src/ssynth/Model/Builder.cpp"
"${CMAKE_CURRENT_LIST_DIR}/libssynth/src/ssynth/Model/CustomRule.cpp"
"${CMAKE_CURRENT_LIST_DIR}/libssynth/src/ssynth/Model/PrimitiveRule.cpp"
"${CMAKE_CURRENT_LIST_DIR}/libssynth/src/ssynth/Model/RuleSet.cpp"
"${CMAKE_CURRENT_LIST_DIR}/libssynth/src/ssynth/Model/State.cpp"
"${CMAKE_CURRENT_LIST_DIR}/libssynth/src/ssynth/Model/Transformation.cpp"
"${CMAKE_CURRENT_LIST_DIR}/libssynth/src/ssynth/Model/Rendering/TemplateRenderer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/libssynth/src/ssynth/Model/Rendering/ObjRenderer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/libssynth/src/ssynth/ColorPool.cpp"
"${CMAKE_CURRENT_LIST_DIR}/libssynth/src/ssynth/ColorUtils.cpp"
"${CMAKE_CURRENT_LIST_DIR}/libssynth/src/ssynth/Logging.cpp"
"${CMAKE_CURRENT_LIST_DIR}/libssynth/src/ssynth/MiniParser.cpp"
"${CMAKE_CURRENT_LIST_DIR}/libssynth/src/ssynth/RandomStreams.cpp")
target_include_directories(ssynth SYSTEM
PUBLIC "${CMAKE_CURRENT_LIST_DIR}/libssynth/src")

target_link_libraries(ssynth PRIVATE "${QT_PREFIX}::Core" "${QT_PREFIX}::Gui"
"${QT_PREFIX}::Xml" score_lib_base)

if(NOT MSVC)
target_compile_options(ssynth PRIVATE -w)
endif()
4 changes: 0 additions & 4 deletions 3rdparty/suil.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
if(OSSIA_USE_SYSTEM_LIBRARIES)
return()
endif()

if(NOT LV2_PATH)
return()
endif()
Expand Down
13 changes: 13 additions & 0 deletions 3rdparty/vcglib.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
score_use_system(use_sys vcglib)
set(VCGLIB_INC "${CMAKE_CURRENT_LIST_DIR}/vcglib")
if(use_sys)
find_path(VCGLIB_INCLUDE_DIR vcg/complex/complex.h)
if(VCGLIB_INCLUDE_DIR)
set(VCGLIB_INC "${VCGLIB_INCLUDE_DIR}")
endif()
endif()

if(NOT TARGET vcglib)
add_library(vcglib INTERFACE IMPORTED GLOBAL)
target_include_directories(vcglib SYSTEM INTERFACE "${VCGLIB_INC}")
endif()
3 changes: 2 additions & 1 deletion 3rdparty/vst3.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
if(OSSIA_USE_SYSTEM_LIBRARIES AND LINUX)
score_use_system(use_sys vst3)
if(use_sys AND LINUX)
find_path(VST3_SDK_MODULE_DIR
public.sdk/source/vst/hosting/module_linux.cpp
PATH_SUFFIXES vst3sdk
Expand Down
3 changes: 2 additions & 1 deletion 3rdparty/xtensor.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
if(SCORE_USE_SYSTEM_LIBRARIES)
score_use_system(use_sys xtensor)
if(use_sys)
find_package(xtl 0.8.0 GLOBAL CONFIG)
find_package(xsimd 13.2.0 GLOBAL CONFIG)
find_package(xtensor 0.27.0 GLOBAL CONFIG)
Expand Down
Loading
Loading