Skip to content

Commit

Permalink
Link against AppKit
Browse files Browse the repository at this point in the history
  • Loading branch information
Elgato-AStory committed Sep 9, 2024
1 parent 5796416 commit b4e0150
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Sources/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
cmake_minimum_required(VERSION 3.10)

project(com.elgato.cpu VERSION 1.2)
project(com.elgato.cpu VERSION 1.4)

if (APPLE)
set(
STREAMDECK_PLUGIN_DIR
"$ENV{HOME}/Library/ApplicationSupport/com.elgato.StreamDeck/Plugins"
)
find_library(APPKIT_LIBRARY AppKit)
endif()
set(
CMAKE_INSTALL_PREFIX
Expand All @@ -28,13 +29,18 @@ set(
MyStreamDeckPlugin.cpp
main.cpp
)
set(
EXTRA_LIBS
StreamDeckSDK
)
if (APPLE)
list(APPEND SOURCES macOS/CpuUsageHelper.mm)
list(APPEND EXTRA_LIBS ${APPKIT_LIBRARY})
elseif (WIN32)
list(APPEND SOURCES Windows/CpuUsageHelper.cpp)
endif()
add_executable(
cpu
${SOURCES}
)
target_link_libraries(cpu StreamDeckSDK)
target_link_libraries(cpu ${EXTRA_LIBS})

0 comments on commit b4e0150

Please sign in to comment.