File tree Expand file tree Collapse file tree 5 files changed +55
-3
lines changed
Expand file tree Collapse file tree 5 files changed +55
-3
lines changed Original file line number Diff line number Diff line change 1111 cmake :
1212 type : string
1313 # This default value shows off how to inline the desktop and loop module to produce a single shared library that contains all commonly required functionality
14- default : -Dsaucer_bindings_static=ON -Dsaucer_bindings_modules="desktop;loop" -Dsaucer_bindings_inline_modules="desktop;loop"
14+ default : -Dsaucer_bindings_static=ON -Dsaucer_bindings_modules="desktop;loop;boson " -Dsaucer_bindings_inline_modules="desktop;loop;boson "
1515 description : Additional CMake Arguments to pass
1616
1717concurrency :
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ option(saucer_bindings_static "Build saucer as a static library" OFF)
1111# | Library options |
1212# +-------------------------------------------------------------------------------------------------------+
1313
14- set (saucer_bindings_modules "desktop;pdf;loop" CACHE STRING "A list of modules to build" )
15- set (saucer_bindings_inline_modules "loop" CACHE STRING "A list of modules to inline into the built library" )
14+ set (saucer_bindings_modules "desktop;pdf;loop;boson " CACHE STRING "A list of modules to build" )
15+ set (saucer_bindings_inline_modules "loop" CACHE STRING "A list of modules to inline into the built library" )
1616
1717# +-------------------------------------------------------------------------------------------------------+
1818# | Convenience wrapper over `message` |
Original file line number Diff line number Diff line change 1+ # --------------------------------------------------------------------------------------------------------
2+ # Setup library
3+ # --------------------------------------------------------------------------------------------------------
4+
5+ saucer_bindings_add_module(desktop "BOSON_EXPORT" )
6+
7+ # --------------------------------------------------------------------------------------------------------
8+ # Include directories
9+ # --------------------------------------------------------------------------------------------------------
10+
11+ target_include_directories (${MODULE_NAME} PUBLIC "include" )
12+ target_include_directories (${MODULE_NAME} PRIVATE "include/saucer" )
13+
14+ # --------------------------------------------------------------------------------------------------------
15+ # Add Sources
16+ # --------------------------------------------------------------------------------------------------------
17+
18+ add_compile_definitions (BOSON_VERSION="0.6.0" )
19+
20+ target_sources (${MODULE_NAME} PRIVATE
21+ "src/boson.cpp"
22+ )
Original file line number Diff line number Diff line change 1+ #pragma once
2+
3+ #ifdef __cplusplus
4+ extern "C"
5+ {
6+ #endif
7+
8+ #include "export.h"
9+
10+ BOSON_EXPORT const char * boson_version ();
11+
12+ #ifdef __cplusplus
13+ }
14+ #endif
Original file line number Diff line number Diff line change 1+ #include " boson.h"
2+
3+ #define BOSON_STRING (value ) #value
4+ #define BOSON_STRING_EXPAND (value ) BOSON_STRING(value)
5+
6+ extern " C"
7+ {
8+ const char * boson_version ()
9+ {
10+ #ifndef BOSON_VERSION
11+ #define unknown -dev
12+ #endif
13+
14+ return BOSON_STRING_EXPAND (BOSON_VERSION) " " ;
15+ }
16+ }
You can’t perform that action at this time.
0 commit comments