-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
don't depend on submodules for clap and clap-helpers #38
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
cmake_minimum_required(VERSION 3.17) | ||
cmake_minimum_required(VERSION 3.24) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. needed for the behavior that I want in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 3.24 is OK, it is quite old already. |
||
cmake_policy(SET CMP0091 NEW) # use CMAKE_MSVC_RUNTIME_LIBRARY | ||
cmake_policy(SET CMP0100 NEW) # handle .hh files | ||
cmake_policy(SET CMP0110 NEW) # arbitrary test name | ||
|
||
enable_testing() | ||
|
||
set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreadedDLL) | ||
|
||
project(CLAP_EXAMPLES C CXX) | ||
|
@@ -13,11 +11,10 @@ set(UsePkgConfig TRUE CACHE BOOL "Use PkgConfig to find RtMidi and RtAudio depen | |
set(CLAP_HOST_BUNDLE FALSE CACHE BOOL "Produce a macOS bundle") | ||
set(CLAP_HOST_BINARY clap-host CACHE STRING "File name of the resulting binary") | ||
|
||
include(cmake/Dependencies.cmake) | ||
|
||
set(CMAKE_AUTOMOC ON) | ||
|
||
#find_package(Qt6 COMPONENTS Widgets REQUIRED) | ||
find_package(Qt6Core CONFIG REQUIRED) | ||
find_package(Qt6Widgets CONFIG REQUIRED) | ||
|
||
if(${CMAKE_CXX_COMPILER_ID} MATCHES "AppleClang|Clang|GNU") | ||
add_compile_options(-fvisibility=hidden -fvisibility-inlines-hidden | ||
|
@@ -29,9 +26,9 @@ if(${CMAKE_CXX_COMPILER_ID} MATCHES "AppleClang|Clang") | |
add_compile_options(-Wmost -Wsuper-class-method-mismatch) | ||
endif() | ||
|
||
add_subdirectory(clap EXCLUDE_FROM_ALL) | ||
add_subdirectory(clap-helpers EXCLUDE_FROM_ALL) | ||
|
||
#find_package(Qt6 COMPONENTS Widgets REQUIRED) | ||
find_package(Qt6Core CONFIG REQUIRED) | ||
find_package(Qt6Widgets CONFIG REQUIRED) | ||
if(UsePkgConfig) | ||
find_package(PkgConfig REQUIRED) | ||
pkg_check_modules(RtMidi REQUIRED IMPORTED_TARGET rtmidi) | ||
|
@@ -40,6 +37,8 @@ else() | |
find_package(RtMidi CONFIG REQUIRED) | ||
find_package(RtAudio CONFIG REQUIRED) | ||
endif() | ||
find_package(clap CONFIG REQUIRED) | ||
find_package(clap-helpers CONFIG REQUIRED) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just wanted to get all the compiler flag stuff before all the |
||
|
||
add_subdirectory(host) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
include(FetchContent) | ||
|
||
FetchContent_Declare( | ||
clap | ||
GIT_REPOSITORY https://github.com/free-audio/clap.git | ||
GIT_TAG 1.2.0 | ||
SYSTEM | ||
# 'FIND_PACKAGE_ARGS' will skip download if | ||
# the target is already available in the system | ||
FIND_PACKAGE_ARGS NAMES clap | ||
) | ||
|
||
FetchContent_Declare( | ||
clap-helpers | ||
GIT_REPOSITORY https://github.com/free-audio/clap-helpers.git | ||
GIT_TAG main | ||
SYSTEM | ||
FIND_PACKAGE_ARGS NAMES clap-helpers | ||
) | ||
|
||
|
||
FetchContent_MakeAvailable(clap clap-helpers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are all over the place on macOS, hope you don't mind
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally don't mind.
Though in the best practice, you could add those to your personal gitignore (global git config).