-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
73 lines (58 loc) · 1.78 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
cmake_minimum_required(VERSION 3.10)
project(browser)
find_package(PkgConfig REQUIRED)
pkg_check_modules(WEBKIT2GTK REQUIRED IMPORTED_TARGET webkit2gtk-4.0)
add_executable(MyApp src/main.cpp)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/build)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})
add_custom_command(
OUTPUT browserui
COMMAND cd src/browser && yarn build
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Building browser"
)
include_directories(
extern/libtidy/include
extern/curl/include
/usr/include/webkitgtk-4.0
extern/glib/include
extern/atk-1.0/include
extern/gtk-3.0/include
extern/pango/include
extern/harfbuzz/include
extern/cairo/include
extern/gdk-pixbuf/include
extern/libsoup-3.0/include
#extern/v8/v8/include
)
#add_subdirectory(extern/v8)
add_subdirectory(extern/libtidy)
add_subdirectory(extern/curl)
add_subdirectory(src)
add_library(Curl STATIC IMPORTED)
set_target_properties(Curl PROPERTIES IMPORTED_LOCATION ${CMAKE_BINARY_DIR}/libcurl.a)
add_custom_target(browser_build ALL DEPENDS browserui)
target_link_libraries(MyApp PRIVATE
JavascriptHandler
Curl
PkgConfig::WEBKIT2GTK
RENDER
AppData
TABMANAGER
TAB
#EVENTS
ssl
crypto
${CMAKE_SOURCE_DIR}/extern/libtidy/build/cmake/libtidy.so
)
#target_link_libraries(MyApp v8_libbase)
#target_link_libraries(MyApp v8_base_without_compiler)
#target_link_libraries(MyApp v8_compiler)
#target_link_libraries(MyApp v8_libplatform)
#target_link_libraries(MyApp v8_snapshot)
#target_link_libraries(MyApp v8_libsampler)
#target_link_libraries(MyApp v8_inspector)
#target_link_libraries(MyApp v8_initializers)
#target_link_libraries(MyApp v8_torque_generated)