Skip to content

Commit

Permalink
Demonstrate how CMake Version can get to C++ (#226)
Browse files Browse the repository at this point in the history
* Demonstrate how CMake Version can get to C++

Here we replace the host version in the clap host proxy startup
with the CMake version from the CMake Project list

* Run apt-get update before install
  • Loading branch information
baconpaul authored and defiantnerd committed Mar 10, 2024
1 parent 0c51f12 commit dd3459c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/pullreq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ jobs:
with:
submodules: recursive

- name: Apt Update
if: ${{ matrix.run_aptget }}
run: sudo apt-get update

- name: Get Deps
if: ${{ matrix.run_aptget }}
run: sudo apt-get install -y alsa alsa-tools libasound2-dev libjack-dev libgtk-3-dev
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ project(clap-wrapper
VERSION 0.7.1
DESCRIPTION "CLAP-as-X wrappers"
)
set(CLAP_WRAPPER_VERSION "${CMAKE_PROJECT_VERSION}" CACHE STRING "Version of the wrapper project")

if (APPLE)
enable_language(OBJC)
Expand Down
2 changes: 1 addition & 1 deletion cmake/shared_prologue.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ endif()
add_library(clap-wrapper-compile-options INTERFACE)
add_library(clap-wrapper-sanitizer-options INTERFACE)

target_compile_options(clap-wrapper-compile-options INTERFACE -D${CLAP_WRAPPER_PLATFORM}=1)
target_compile_options(clap-wrapper-compile-options INTERFACE -D${CLAP_WRAPPER_PLATFORM}=1 -DCLAP_WRAPPER_VERSION="${CLAP_WRAPPER_VERSION}")
if (APPLE)
target_link_libraries(clap-wrapper-compile-options INTERFACE macos_filesystem_support)
endif()
Expand Down
2 changes: 1 addition & 1 deletion src/clap_proxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Plugin::Plugin(IHost* host)
host->host_get_name(),
"defiant nerd",
"https://www.defiantnerd.com",
"0.0.1",
CLAP_WRAPPER_VERSION,
Plugin::clapExtension,
Plugin::clapRequestRestart,
Plugin::clapRequestProcess,
Expand Down

0 comments on commit dd3459c

Please sign in to comment.