CMakeLists.txt 2.69 KB
Newer Older
XueShuming's avatar
XueShuming committed
1
2
3
4
5
6
7
8
9
10
11
12
#
# 
#                           IMPORTANT NOTICE
# 
#  The following open source license statement does not apply to any
#  entity in the Exception List published by FMSoft.
# 
#  For more information, please visit:
# 
#  https://www.fmsoft.cn/exception-list
# 
#
XueShuming's avatar
XueShuming committed
13
14
15
#   This file is part of HiDOMLayout. hiDOMLayout is a library to
#   maintain a DOM tree, lay out and stylize the DOM nodes by
#   using CSS (Cascaded Style Sheets).
XueShuming's avatar
XueShuming committed
16
#
XueShuming's avatar
XueShuming committed
17
#   Copyright (C) 2021 Beijing FMSoft Technologies Co., Ltd.
XueShuming's avatar
XueShuming committed
18
19
#
#   This program is free software: you can redistribute it and/or modify
XueShuming's avatar
XueShuming committed
20
#   it under the terms of the GNU Lesser General License as published by
XueShuming's avatar
XueShuming committed
21
22
23
24
25
26
#   the Free Software Foundation, either version 3 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
XueShuming's avatar
XueShuming committed
27
#   GNU Lesser General License for more details.
XueShuming's avatar
XueShuming committed
28
#
XueShuming's avatar
XueShuming committed
29
#   You should have received a copy of the GNU Lesser General License
XueShuming's avatar
XueShuming committed
30
31
32
33
34
#   along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
#   Or,
#
#   As this program is a library, any link to this program must follow
XueShuming's avatar
XueShuming committed
35
36
#   GNU Lesser General License version 3 (LGPLv3). If you cannot accept
#   LGPLv3, you need to be licensed from FMSoft.
XueShuming's avatar
XueShuming committed
37
38
39
40
41
42
43
44
45
46
#
#   If you have got a commercial license of this program, please use it
#   under the terms and conditions of the commercial license.
#
#   For more information about the commercial license, please refer to
#   <http://www.minigui.com/blog/minigui-licensing-policy/>.
#

cmake_minimum_required(VERSION 3.10)

XueShuming's avatar
XueShuming committed
47
project(hidomlayout VERSION 1.0.0)
XueShuming's avatar
XueShuming committed
48
49
50

#add_definitions(-D_DEBUG)

XueShuming's avatar
XueShuming committed
51
list(APPEND hidomlayout_INCLUDE_DIRECTORIES
XueShuming's avatar
XueShuming committed
52
53
54
55
    ${CMAKE_SOURCE_DIR}/include
    ${CMAKE_SOURCE_DIR}/src/css/libparserutils/include
    ${CMAKE_SOURCE_DIR}/src/css/libwapcaplet/include
    ${CMAKE_SOURCE_DIR}/src/css/libcss/include
XueShuming's avatar
XueShuming committed
56
    ${CMAKE_SOURCE_DIR}/src/layout/src
XueShuming's avatar
XueShuming committed
57
58
)

XueShuming's avatar
XueShuming committed
59
list(APPEND hidomlayout_SOURCES
XueShuming's avatar
XueShuming committed
60
61
62
63
64
65
    src/node.c
    src/select.c
    src/utils.c
    src/layout.c
    src/layout_block.c
    src/layout_inline_block.c
XueShuming's avatar
XueShuming committed
66
    src/layout_grid.c
XueShuming's avatar
XueShuming committed
67
68
)

XueShuming's avatar
XueShuming committed
69
include_directories(${hidomlayout_INCLUDE_DIRECTORIES} ${GLIB_INCLUDE_DIRS})
XueShuming's avatar
XueShuming committed
70
link_directories(${GLIB_LIBRARIES})
XueShuming's avatar
XueShuming committed
71
add_library(hidomlayout SHARED ${hidomlayout_SOURCES})
XueShuming's avatar
XueShuming committed
72
set_target_properties(hidomlayout PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
XueShuming's avatar
XueShuming committed
73
target_link_libraries(hidomlayout css)
XueShuming's avatar
XueShuming committed
74

XueShuming's avatar
XueShuming committed
75

XueShuming's avatar
XueShuming committed
76
77
configure_file(hidomlayout.pc.in hidomlayout.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/hidomlayout.pc DESTINATION lib/pkgconfig)
XueShuming's avatar
XueShuming committed
78
install(FILES ${CMAKE_SOURCE_DIR}/include/hidomlayout.h DESTINATION include)
XueShuming's avatar
XueShuming committed
79
install(TARGETS hidomlayout DESTINATION lib)