Commit 9f59bfcf authored by XueShuming's avatar XueShuming
Browse files

link to minigui

parent b2330b5c
......@@ -7,6 +7,10 @@ find_package(HiDomLayout REQUIRED)
find_package(hicairo REQUIRED)
find_package(LibXml2 REQUIRED)
find_package(Pango REQUIRED)
find_package(MiniGUI 5.0.2 REQUIRED)
set(MINIGUI_LIBRARIES ${MiniGUI_LIBRARIES})
set(MINIGUI_INCLUDE_DIRS ${MiniGUI_INCLUDE_DIRS})
add_subdirectory(src)
add_subdirectory(tests)
......
# - Try to find MiniGUI
# Once done, this will define
#
# MiniGUI_FOUND - system has MiniGUI.
# MiniGUI_INCLUDE_DIRS - the MiniGui include directories
# MiniGUI_LIBRARIES - link these to use MiniGUI.
#
# 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 Lesser 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 Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# Or,
#
# As this component is a program released under LGPLv3, which claims
# explicitly that the program could be modified by any end user
# even if the program is conveyed in non-source form on the system it runs.
# Generally, if you distribute this program in embedded devices,
# you might not satisfy this condition. Under this situation or you can
# not accept any condition of LGPLv3, you need to get a commercial license
# from FMSoft, along with a patent license for the patents owned by FMSoft.
#
# If you have got a commercial/patent license of this program, please use it
# under the terms and conditions of the commercial license.
#
# For more information about the commercial license and patent license,
# please refer to
# <https://hybridos.fmsoft.cn/blog/hybridos-licensing-policy/>.
#
# Also note that the LGPLv3 license does not apply to any entity in the
# Exception List published by Beijing FMSoft Technologies Co., Ltd.
#
# If you are or the entity you represent is listed in the Exception List,
# the above open source or free software license does not apply to you
# or the entity you represent. Regardless of the purpose, you should not
# use the software in any way whatsoever, including but not limited to
# downloading, viewing, copying, distributing, compiling, and running.
# If you have already downloaded it, you MUST destroy all of its copies.
#
# The Exception List is published by FMSoft and may be updated
# from time to time. For more information, please see
# <https://www.fmsoft.cn/exception-list>.
find_package(PkgConfig)
pkg_check_modules(MiniGUI minigui)
set(VERSION_OK TRUE)
if (MiniGUI_VERSION)
if (MiniGUI_FIND_VERSION_EXACT)
if (NOT("${MiniGUI_FIND_VERSION}" VERSION_EQUAL "${MiniGUI_VERSION}"))
set(VERSION_OK FALSE)
endif ()
else ()
if ("${MiniGUI_VERSION}" VERSION_LESS "${MiniGUI_FIND_VERSION}")
set(VERSION_OK FALSE)
endif ()
endif ()
endif ()
if (NOT MiniGUI_INCLUDE_DIRS)
set(MiniGUI_INCLUDE_DIRS ${MiniGUI_INCLUDEDIR})
endif ()
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MiniGUI DEFAULT_MSG MiniGUI_INCLUDE_DIRS MiniGUI_LIBRARIES VERSION_OK)
......@@ -42,10 +42,10 @@ list(APPEND hisvg_SOURCES
include_directories(${hisvg_INCLUDE_DIRECTORIES} ${GLIB_INCLUDE_DIRS} ${HIDOMLAYOUT_INCLUDE_DIRS}
${HICairo_INCLUDE_DIRS} ${LIBXML2_INCLUDE_DIRS} ${PANGO_INCLUDE_DIRS} ${GIO_UNIX_INCLUDE_DIRS}
${CROCO_INCLUDE_DIRS})
${MINIGUI_INCLUDE_DIRS})
link_directories(${HIDOMLAYOUT_LIBRARY_DIRS})
add_library(hisvg SHARED ${hisvg_SOURCES})
target_link_libraries(hisvg ${GLIB_LIBRARIES} ${HIDOMLAYOUT_LIBRARIES} ${HICairo_LIBRARIES} ${LIBXML2_LIBRARY})
target_link_libraries(hisvg ${GLIB_LIBRARIES} ${HIDOMLAYOUT_LIBRARIES} ${HICairo_LIBRARIES} ${LIBXML2_LIBRARY} ${MINIGUI_LIBRARIES} )
configure_file(hisvg.pc.in hisvg.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/hisvg.pc DESTINATION lib/pkgconfig)
......
......@@ -12,10 +12,10 @@ list(APPEND svg2png_SOURCES
include_directories(${svg2png_INCLUDE_DIRECTORIES} ${GLIB_INCLUDE_DIRS} ${HIDOMLAYOUT_INCLUDE_DIRS}
${HICairo_INCLUDE_DIRS} ${LIBXML2_INCLUDE_DIRS} ${PANGO_INCLUDE_DIRS} ${GIO_UNIX_INCLUDE_DIRS}
${CROCO_INCLUDE_DIRS})
${MINIGUI_INCLUDE_DIRS})
link_directories(${HIDOMLAYOUT_LIBRARY_DIRS})
add_executable(svg2png ${svg2png_SOURCES})
target_link_libraries(svg2png hisvg ${GLIB_LIBRARIES}
${HIDOMLAYOUT_LIBRARIES} ${HICairo_LIBRARIES} ${LIBXML2_LIBRARY} ${PANGO_LIBRARIES}
${GIO_UNIX_LIBRARIES} ${CROCO_LIBRARIES})
${GIO_UNIX_LIBRARIES} ${MINIGUI_LIBRARIES})
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