-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Work started by @jpcima in sfztools/sfizz#848 adapted after repository split with newer VST3 SDK
- Loading branch information
Showing
27 changed files
with
5,424 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Find Linux system libraries | ||
add_library(dl INTERFACE) | ||
|
||
if(NOT WIN32 AND NOT APPLE) | ||
find_library(DL_LIBRARY "dl") | ||
target_link_libraries(dl INTERFACE "${DL_LIBRARY}") | ||
|
||
# JACK | ||
find_package(PkgConfig REQUIRED) | ||
pkg_check_modules(JACK "jack" REQUIRED) | ||
|
||
# The X11 library | ||
find_package(X11 REQUIRED) | ||
add_library(sfizz_x11 INTERFACE) | ||
target_include_directories(sfizz_x11 INTERFACE "${X11_INCLUDE_DIR}") | ||
target_link_libraries(sfizz_x11 INTERFACE "${X11_X11_LIB}") | ||
add_library(sfizz::x11 ALIAS sfizz_x11) | ||
|
||
# The GtkMM library | ||
find_package(PkgConfig REQUIRED) | ||
pkg_check_modules(GTKMM "gtkmm-3.0" REQUIRED) | ||
add_library(sfizz_gtkmm INTERFACE) | ||
target_include_directories(sfizz_gtkmm INTERFACE ${GTKMM_INCLUDE_DIRS}) | ||
target_link_libraries(sfizz_gtkmm INTERFACE ${GTKMM_LIBRARIES}) | ||
link_libraries(${GTKMM_LIBRARY_DIRS}) | ||
add_library(sfizz::gtkmm ALIAS sfizz_gtkmm) | ||
endif() | ||
|
||
add_library(sfizz::dl ALIAS dl) | ||
|
||
# Find C++ filesystem | ||
function(sfizz_find_std_fs TARGET) | ||
add_library("${TARGET}" INTERFACE) | ||
|
||
set(_fs_src | ||
"#include <filesystem> | ||
int main() { return std::filesystem::exists(\"myfile\") ? 0 : 1; }") | ||
set(_expfs_src | ||
"#include <experimental/filesystem> | ||
int main() { return std::experimental::filesystem::exists(\"myfile\") ? 0 : 1; }") | ||
|
||
check_cxx_source_compiles("${_fs_src}" HAVE_STDFS_DIRECT) | ||
check_cxx_source_compiles("${_expfs_src}" HAVE_STDFS_EXPERIMENTAL_DIRECT) | ||
if(HAVE_STDFS_DIRECT OR HAVE_STDFS_EXPERIMENTAL_DIRECT) | ||
return() | ||
endif() | ||
|
||
find_library(STDCPPFS_LIBRARY "stdc++fs") | ||
if(STDCPPFS_LIBRARY) | ||
set(CMAKE_REQUIRED_LIBRARIES "${STDCPPFS_LIBRARY}") | ||
check_cxx_source_compiles("${_fs_src}" HAVE_STDFS_LIBSTDCPPFS) | ||
check_cxx_source_compiles("${_expfs_src}" HAVE_STDFS_EXPERIMENTAL_LIBSTDCPPFS) | ||
if(HAVE_STDFS_LIBSTDCPPFS OR HAVE_STDFS_EXPERIMENTAL_LIBSTDCPPFS) | ||
target_link_libraries("${TARGET}" INTERFACE "${STDCPPFS_LIBRARY}") | ||
return() | ||
endif() | ||
endif() | ||
|
||
find_library(CPPFS_LIBRARY "c++fs") | ||
if(CPPFS_LIBRARY) | ||
set(CMAKE_REQUIRED_LIBRARIES "${CPPFS_LIBRARY}") | ||
check_cxx_source_compiles("${_fs_src}" HAVE_STDFS_STDCPPFS) | ||
check_cxx_source_compiles("${_expfs_src}" HAVE_STDFS_EXPERIMENTAL_STDCPPFS) | ||
if(HAVE_STDFS_STDCPPFS OR HAVE_STDFS_EXPERIMENTAL_STDCPPFS) | ||
target_link_libraries("${TARGET}" INTERFACE "${CPPFS_LIBRARY}") | ||
return() | ||
endif() | ||
endif() | ||
endfunction() | ||
sfizz_find_std_fs(stdfs) | ||
add_library(sfizz::stdfs ALIAS stdfs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.