Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 40 additions & 38 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,39 +1,41 @@
cmake_minimum_required(VERSION 3.16)

include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/internal.cmake")
webview_extract_version()

project(
webview
VERSION "${WEBVIEW_VERSION_NUMBER}"
DESCRIPTION "A tiny cross-platform webview library for C/C++ to build modern cross-platform GUIs."
HOMEPAGE_URL https://github.com/webview/webview)

webview_init()

if(WEBVIEW_BUILD)
add_subdirectory(compatibility)

if(WEBVIEW_BUILD_TESTS)
include(CTest)
add_subdirectory(test_driver)
endif()

add_subdirectory(core)

if(WEBVIEW_BUILD_EXAMPLES)
add_subdirectory(examples)
endif()

if(WEBVIEW_BUILD_DOCS)
add_subdirectory(docs)
endif()

if(WEBVIEW_INSTALL_TARGETS)
webview_install_targets()
endif()

if(WEBVIEW_ENABLE_PACKAGING)
add_subdirectory(packaging)
endif()
endif()
project(alloy_host)

set(CMAKE_CXX_STANDARD 17)

# Find OpenSSL
find_package(OpenSSL REQUIRED)
# Find GTK and WebKit
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
pkg_check_modules(WEBKIT2 REQUIRED webkit2gtk-4.1)

# MicroQuickJS
add_library(mquickjs STATIC
core/mquickjs/mquickjs.c
core/mquickjs/mqjs_stdlib.c
core/mquickjs/dtoa.c
)
target_include_directories(mquickjs PUBLIC core/mquickjs)

# Webview
add_library(webview_static STATIC core/webview/src/webview.cc)
target_include_directories(webview_static PUBLIC core/webview/include ${GTK3_INCLUDE_DIRS} ${WEBKIT2_INCLUDE_DIRS})
target_compile_definitions(webview_static PUBLIC WEBVIEW_STATIC)
target_link_libraries(webview_static PRIVATE ${GTK3_LIBRARIES} ${WEBKIT2_LIBRARIES})

# Alloy Components
add_library(alloy STATIC
src/alloy/bindings.cpp
src/alloy/crypto.cpp
src/alloy/ipc.cpp
src/alloy/eval.cpp
src/alloy/streams.cpp
)
target_include_directories(alloy PUBLIC src/alloy core/mquickjs core/webview/include ${GTK3_INCLUDE_DIRS} ${WEBKIT2_INCLUDE_DIRS})
target_link_libraries(alloy PUBLIC mquickjs OpenSSL::Crypto webview_static)

# Host Executable
add_executable(alloy_host src/host.cpp src/bundle.c)
target_include_directories(alloy_host PRIVATE core/webview/include src/alloy core/mquickjs ${GTK3_INCLUDE_DIRS} ${WEBKIT2_INCLUDE_DIRS})
target_link_libraries(alloy_host PRIVATE alloy sqlite3 ${GTK3_LIBRARIES} ${WEBKIT2_LIBRARIES})
39 changes: 39 additions & 0 deletions CMakeLists.txt.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
cmake_minimum_required(VERSION 3.16)

include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/internal.cmake")
webview_extract_version()

project(
webview
VERSION "${WEBVIEW_VERSION_NUMBER}"
DESCRIPTION "A tiny cross-platform webview library for C/C++ to build modern cross-platform GUIs."
HOMEPAGE_URL https://github.com/webview/webview)

webview_init()

if(WEBVIEW_BUILD)
add_subdirectory(compatibility)

if(WEBVIEW_BUILD_TESTS)
include(CTest)
add_subdirectory(test_driver)
endif()

add_subdirectory(core)

if(WEBVIEW_BUILD_EXAMPLES)
add_subdirectory(examples)
endif()

if(WEBVIEW_BUILD_DOCS)
add_subdirectory(docs)
endif()

if(WEBVIEW_INSTALL_TARGETS)
webview_install_targets()
endif()

if(WEBVIEW_ENABLE_PACKAGING)
add_subdirectory(packaging)
endif()
endif()
Binary file added build_alloy/.ninja_deps
Binary file not shown.
31 changes: 31 additions & 0 deletions build_alloy/.ninja_log
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# ninja log v5
369 391 1775082419181578612 CMakeFiles/alloy_host.dir/src/bundle.c.o 16ef4fb74808caf3
2129 2221 1775082945469572686 liballoy.a 7ce4d2fabd96357a
366 480 1775082419273578611 CMakeFiles/alloy_host.dir/src/host.c.o c69a291335e00154
8 2129 1775082945377572687 CMakeFiles/alloy.dir/src/alloy/bindings.cpp.o 18dc8847a5ce8faf
8 67 1775082793269574400 CMakeFiles/mquickjs.dir/core/mquickjs/mquickjs.c.o 341216e588f285ed
10 2178 1775082647069576046 CMakeFiles/alloy.dir/src/alloy/eval.cpp.o f839466ed551bdbd
3 4089 1775082255965580449 CMakeFiles/webview_static.dir/core/webview/src/webview.cc.o 960721692af64b76
12 565 1775082645461576064 CMakeFiles/alloy.dir/src/alloy/streams.cpp.o 44999fd628a34fa1
2221 2639 1775082945889572681 alloy_host d8cd949c5139b11a
9 2377 1775082647269576044 CMakeFiles/alloy.dir/src/alloy/ipc.cpp.o a1beee83320ea31d
6 1263 1775082253141580481 CMakeFiles/alloy.dir/src/alloy/crypto.cpp.o f47c6ef58db81366
8 36 1775082644929576070 CMakeFiles/mquickjs.dir/core/mquickjs/mqjs_stdlib.c.o 8a10f174ff1ec5cd
3 180 1775082252049580493 CMakeFiles/mquickjs.dir/core/mquickjs/dtoa.c.o 22d5382433c85b87
10 369 1775082419161578612 libwebview_static.a 393abd71403a25ce
67 126 1775082793325574399 libmquickjs.a eb4ce7e963602997
7 1943 1775083117269570752 CMakeFiles/alloy_host.dir/src/host.cpp.o 172d90ce17f44893
1944 2349 1775083117673570747 alloy_host 5e4c3e5bf24e41c7
8 66 1775083292901568774 CMakeFiles/mquickjs.dir/core/mquickjs/mquickjs.c.o 341216e588f285ed
67 128 1775083292961568774 libmquickjs.a eb4ce7e963602997
8 2110 1775083294945568751 CMakeFiles/alloy.dir/src/alloy/bindings.cpp.o 18dc8847a5ce8faf
2111 2213 1775083295041568750 liballoy.a 7ce4d2fabd96357a
2213 2626 1775083295457568746 alloy_host 5e4c3e5bf24e41c7
8 76 1775083487941566578 CMakeFiles/mquickjs.dir/core/mquickjs/mquickjs.c.o 341216e588f285ed
76 138 1775083488001566578 libmquickjs.a eb4ce7e963602997
9 2244 1775083490105566554 CMakeFiles/alloy.dir/src/alloy/bindings.cpp.o 18dc8847a5ce8faf
2244 2341 1775083490197566553 liballoy.a 7ce4d2fabd96357a
2341 2748 1775083490609566548 alloy_host 5e4c3e5bf24e41c7
8 67 1775083651205564740 CMakeFiles/mquickjs.dir/core/mquickjs/mquickjs.c.o 341216e588f285ed
67 126 1775083651261564740 libmquickjs.a eb4ce7e963602997
126 538 1775083651673564735 alloy_host 5e4c3e5bf24e41c7
Loading