File tree Expand file tree Collapse file tree
examples/tray_stats_example Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ add_subdirectory(examples/storage_c_example)
2929add_subdirectory (examples/tray_icon_example )
3030add_subdirectory (examples/tray_icon_c_example )
3131add_subdirectory (examples/tray_view_example )
32+ add_subdirectory (examples/tray_stats_example )
3233add_subdirectory (examples/url_opener_c_example )
3334add_subdirectory (examples/window_c_example )
3435add_subdirectory (examples/window_example )
Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.16 )
2+ project (tray_stats_example)
3+
4+ set (CMAKE_CXX_STANDARD 17)
5+
6+ # Include the nativeapi headers
7+ include_directories (${CMAKE_SOURCE_DIR } /../../include )
8+
9+ # Add the executable
10+ add_executable (tray_stats_example main.cpp )
11+
12+ # Link against the nativeapi library
13+ target_link_libraries (tray_stats_example nativeapi )
14+ if (NATIVEAPI_ENABLE_WINUI3)
15+ target_sources (tray_stats_example PRIVATE "../../cmake/winui3-example.manifest" )
16+ nativeapi_deploy_winui3 (tray_stats_example )
17+ endif ()
18+
19+ # Platform-specific settings
20+ if (CMAKE_SYSTEM_NAME STREQUAL "iOS" )
21+ # iOS uses UIKit, Foundation, CoreGraphics (already linked by nativeapi)
22+ elseif (APPLE )
23+ find_library (COCOA_LIBRARY Cocoa )
24+ target_link_libraries (tray_stats_example ${COCOA_LIBRARY} )
25+ elseif (WIN32 )
26+ target_link_libraries (tray_stats_example user32 kernel32 )
27+ elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux" )
28+ find_package (PkgConfig REQUIRED )
29+ pkg_check_modules (GTK3 REQUIRED gtk+-3.0 )
30+ target_include_directories (tray_stats_example PRIVATE ${GTK3_INCLUDE_DIRS} )
31+ target_link_libraries (tray_stats_example ${GTK3_LIBRARIES} )
32+ elseif (ANDROID )
33+ target_link_libraries (tray_stats_example log android )
34+ endif ()
You can’t perform that action at this time.
0 commit comments