File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed
Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -86,3 +86,31 @@ install(EXPORT webui
8686 NAMESPACE webui::
8787 DESTINATION share/webui
8888)
89+
90+
91+ #//////////////////////////
92+ # Build examples
93+ #//////////////////////////
94+
95+ message (STATUS "Source directory is " ${CMAKE_SOURCE_DIR} )
96+ message (STATUS "Build directory is " ${CMAKE_BINARY_DIR} )
97+
98+ include_directories (${CMAKE_SOURCE_DIR} /include )
99+
100+ add_executable (minimal ${CMAKE_SOURCE_DIR} /examples/C++/minimal/main.cpp)
101+ add_executable (call_js_from_cpp ${CMAKE_SOURCE_DIR} /examples/C++/call_js_from_cpp/main.cpp)
102+ add_executable (call_js_from_c ${CMAKE_SOURCE_DIR} /examples/C/call_js_from_c/main.c)
103+
104+ target_link_libraries (minimal webui)
105+ target_link_libraries (call_js_from_cpp webui)
106+ target_link_libraries (call_js_from_c webui)
107+
108+ if (MSVC )
109+ set_target_properties (minimal PROPERTIES LINK_FLAGS "/SubSystem:\" Windows\" " VS_DPI_AWARE "ON" )
110+ set_target_properties (call_js_from_cpp PROPERTIES LINK_FLAGS "/SubSystem:\" Windows\" " VS_DPI_AWARE "ON" )
111+ set_target_properties (call_js_from_c PROPERTIES LINK_FLAGS "/SubSystem:\" Windows\" " VS_DPI_AWARE "ON" )
112+ endif ()
113+
114+ if (MSVC )
115+ set_property (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT call_js_from_cpp)
116+ endif ()
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ mkdir -p build
3+
4+ # webui-2.5.0, examples
5+ pushd build
6+ cmake .. --fresh
7+ cmake --build . --config Debug
8+ popd
9+
You can’t perform that action at this time.
0 commit comments