Commit b064a114 authored by XueShuming's avatar XueShuming
Browse files

remove hicss dep

parent e0328337
......@@ -43,9 +43,5 @@
cmake_minimum_required(VERSION 3.10)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
find_package(HiCSS REQUIRED)
add_subdirectory(src)
add_subdirectory(test)
find_package(PkgConfig)
pkg_check_modules(HICSS hicss)
set(VERSION_OK TRUE)
if (HICSS_VERSION)
if (HICSS_FIND_VERSION_EXACT)
if (NOT("${HICSS_FIND_VERSION}" VERSION_EQUAL "${HICSS_VERSION}"))
set(VERSION_OK FALSE)
endif ()
else ()
if ("${HICSS_VERSION}" VERSION_LESS "${HICSS_FIND_VERSION}")
set(VERSION_OK FALSE)
endif ()
endif ()
endif ()
if (NOT HICSS_INCLUDE_DIRS)
set(HICSS_INCLUDE_DIRS ${HICSS_INCLUDEDIR})
endif ()
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(HICSS DEFAULT_MSG HICSS_INCLUDE_DIRS HICSS_LIBRARIES VERSION_OK)
......@@ -43,26 +43,5 @@
cmake_minimum_required(VERSION 3.10)
project(hilayout)
#add_definitions(-D_DEBUG)
list(APPEND hilayout_INCLUDE_DIRECTORIES
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/src/layout
)
list(APPEND hilayout_SOURCES
${CMAKE_SOURCE_DIR}/src/layout/node.c
${CMAKE_SOURCE_DIR}/src/layout/select.c
${CMAKE_SOURCE_DIR}/src/layout/utils.c
${CMAKE_SOURCE_DIR}/src/layout/layout.c
${CMAKE_SOURCE_DIR}/src/layout/layout_block.c
${CMAKE_SOURCE_DIR}/src/layout/layout_block.c
${CMAKE_SOURCE_DIR}/src/layout/layout_inline_block.c
)
include_directories(${hilayout_INCLUDE_DIRECTORIES} ${HICSS_INCLUDE_DIRS})
link_directories(${HICSS_LIBRARY_DIRS})
add_library(hilayout SHARED ${hilayout_SOURCES})
target_link_libraries(hilayout ${HICSS_LIBRARIES})
add_subdirectory(css)
add_subdirectory(layout)
#
#
# 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
#
#
# This file is part of HybridOS, a developing operating system based on
# MiniGUI. HybridOs will support embedded systems and smart IoT devices.
#
# Copyright (C) 2020 Beijing FMSoft Technologies Co., Ltd.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# 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
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# 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
# GNU General Public License version 3 (GPLv3). If you cannot accept
# GPLv3, you need to be licensed from FMSoft.
#
# 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)
project(hilayout)
#add_definitions(-D_DEBUG)
list(APPEND hilayout_INCLUDE_DIRECTORIES
${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
)
list(APPEND hilayout_SOURCES
node.c
select.c
utils.c
layout.c
layout_block.c
layout_block.c
layout_inline_block.c
)
include_directories(${hilayout_INCLUDE_DIRECTORIES})
link_directories(${HICSS_LIBRARY_DIRS})
add_library(hilayout SHARED ${hilayout_SOURCES})
target_link_libraries(hilayout css)
......@@ -5,8 +5,10 @@ add_definitions(-D_DEBUG)
# node
list(APPEND node_test_INCLUDE_DIRECTORIES
${CMAKE_SOURCE_DIR}/src/dom
${CMAKE_SOURCE_DIR}/src/select
${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
${CMAKE_SOURCE_DIR}/src/layout
)
......@@ -21,8 +23,10 @@ target_link_libraries(node_test hilayout)
# css
list(APPEND css_select_test_INCLUDE_DIRECTORIES
${CMAKE_SOURCE_DIR}/src/dom
${CMAKE_SOURCE_DIR}/src/select
${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
${CMAKE_SOURCE_DIR}/src/layout
)
......@@ -37,8 +41,10 @@ target_link_libraries(css_select_test hilayout)
list(APPEND css_select_test2_INCLUDE_DIRECTORIES
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/src/dom
${CMAKE_SOURCE_DIR}/src/select
${CMAKE_SOURCE_DIR}/src/css/libparserutils/include
${CMAKE_SOURCE_DIR}/src/css/libwapcaplet/include
${CMAKE_SOURCE_DIR}/src/css/libcss/include
${CMAKE_SOURCE_DIR}/src/layout
)
list(APPEND css_select_test2_SOURCES
......@@ -54,8 +60,10 @@ target_link_libraries(css_select_test2 hilayout)
# layout_test
list(APPEND layout_test_INCLUDE_DIRECTORIES
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/src/dom
${CMAKE_SOURCE_DIR}/src/select
${CMAKE_SOURCE_DIR}/src/css/libparserutils/include
${CMAKE_SOURCE_DIR}/src/css/libwapcaplet/include
${CMAKE_SOURCE_DIR}/src/css/libcss/include
${CMAKE_SOURCE_DIR}/src/layout
)
list(APPEND layout_test_SOURCES
......
No preview for this file type
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment