-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
44 lines (31 loc) · 1.58 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
cmake_minimum_required(VERSION 2.8)
include(FindPkgConfig)
project(sensibrowse)
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "No build type selected, default to Release")
set(CMAKE_BUILD_TYPE "Release")
endif()
set(CMAKE_CXX_FLAGS_DEBUG "-std=c++11 -O0 -DDEBUG -g")
set(CMAKE_C_FLAGS_DEBUG "-std=c++11 -O0 -DDEBUG -g")
set(CMAKE_CXX_FLAGS_RELEASE "-std=c++11 -O3")
set(CMAKE_C_FLAGS_RELEASE "-std=c++11 -O3")
set(SENSIBROWSE_PATH src)
set(LITEHTML_PATH litehtml)
set(CONTAINER_PATH ${LITEHTML_PATH}/containers/linux)
pkg_check_modules(LB_LIBS REQUIRED fontconfig gdkmm-3.0 gtkmm-3.0 libcurl cairo)
set(SOURCE ${SENSIBROWSE_PATH}/main.cpp
${SENSIBROWSE_PATH}/url.cpp
${SENSIBROWSE_PATH}/http.cpp
${SENSIBROWSE_PATH}/utils.cpp
${SENSIBROWSE_PATH}/html_widget.cpp
${CONTAINER_PATH}/container_linux.cpp
${SENSIBROWSE_PATH}/broser_wnd.cpp
)
include_directories(${LITEHTML_PATH}/include ${LB_LIBS_INCLUDE_DIRS})
add_subdirectory(${LITEHTML_PATH})
find_program(XXD_COMMAND xxd)
add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/src/master.css.inc
COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/${LITEHTML_PATH}/include/master.css | xxd -i > ${CMAKE_CURRENT_SOURCE_DIR}/src/master.css.inc)
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/master.css.inc PROPERTIES GENERATED TRUE)
add_executable(sensibrowse ${SOURCE} ${CMAKE_CURRENT_SOURCE_DIR}/src/master.css.inc src/http_loader.h src/http_loader.cpp)
target_link_libraries(sensibrowse litehtml ${LB_LIBS_LIBRARIES} PocoFoundation)