cegui: fix build, trim dependencies

This commit is contained in:
Đoàn Trần Công Danh 2025-08-17 14:28:30 +07:00
parent ecd8ab83f6
commit e1c4ce8418
2 changed files with 60 additions and 5 deletions

View file

@ -0,0 +1,54 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,13 +2,6 @@
# Top-level CMakeLists.txt file for Crazy Eddie's GUI System
################################################################################
cmake_minimum_required(VERSION 2.8.12)
-if (POLICY CMP0017)
- cmake_policy(SET CMP0017 OLD)
-endif()
-
-if (POLICY CMP0045)
- cmake_policy(SET CMP0045 OLD)
-endif()
if (APPLE AND NOT CMAKE_OSX_ARCHITECTURES)
set( CMAKE_OSX_ARCHITECTURES x86_64 CACHE STRING "Build architectures for Mac OS X")
--- a/cmake/CEGUIMacros.cmake
+++ b/cmake/CEGUIMacros.cmake
@@ -51,8 +51,7 @@ endmacro()
macro (cegui_target_link_libraries _TARGET_NAME)
target_link_libraries(${_TARGET_NAME} ${ARGN})
- get_target_property(_TARGET_EXISTS ${_TARGET_NAME}_Static TYPE)
- if (_TARGET_EXISTS)
+ if (TARGET ${_TARGET_NAME}_Static)
foreach(_LIB ${ARGN})
if (${_LIB} STREQUAL optimized OR ${_LIB} STREQUAL debug OR ${_LIB} STREQUAL general)
set (_BUILD ${_LIB})
@@ -137,8 +136,16 @@ endmacro()
#
macro (cegui_add_dependency _TARGET_NAME _DEP_NAME)
# Optional additional arguments: "SCOPE" "IS_SYSTEM"
- get_target_property(_DYNAMIC_EXISTS ${_TARGET_NAME} TYPE)
- get_target_property(_STATIC_EXISTS ${_TARGET_NAME}_Static TYPE)
+ if (TARGET ${_TARGET_NAME})
+ set(_DYNAMIC_EXISTS TRUE)
+ else()
+ set(_DYNAMIC_EXISTS FALSE)
+ endif()
+ if (TARGET ${_TARGET_NAME}_STATIC)
+ set(_STATIC_EXISTS TRUE)
+ else()
+ set(_STATIC_EXISTS FALSE)
+ endif()
if ("${ARGC}" GREATER 2)
if (("${ARGC}" GREATER 3) AND "${ARGV3}")
if (_DYNAMIC_EXISTS)
@@ -765,4 +772,4 @@ macro( cegui_check_mingw )
message( WARNING "If you use MinGW, only the MinGW-w64 flavour (version 3.1 and up) is officially supported. Note: that's MinGW-w64's version, *not* GCC's version! " )
endif()
endif()
-endmacro()
\ No newline at end of file
+endmacro()

View file

@ -1,7 +1,7 @@
# Template file for 'cegui'
pkgname=cegui
version=0.8.7.20190225
revision=6
revision=7
_githash=bfc6a841de45b8e63040d33b9cccc67745337f4e
build_style=cmake
configure_args="-DOpenGL_GL_PREFERENCE=GLVND \
@ -10,8 +10,8 @@ configure_args="-DOpenGL_GL_PREFERENCE=GLVND \
make_build_args="all html"
hostmakedepends="graphviz doxygen dejavu-fonts-ttf gd glm perl pkg-config"
makedepends="libglvnd-devel SDL2-devel SDL2_image-devel libxml2-devel
boost-devel devil-devel glfw-devel glm ois-devel silly-devel fribidi-devel
lua53-devel minizip-devel freetype-devel
boost-devel-minimal devil-devel glfw-devel glm ois-devel silly-devel fribidi-devel
lua53-devel minizip-devel freetype-devel pcre-devel
$(vopt_if irrlicht irrlicht-devel)
$(vopt_if ogre libogre-devel)"
short_desc="Crazy Eddie's Graphical User Interface"
@ -25,6 +25,7 @@ replaces="cegui-data>=0 cegui-sample>=0"
build_options="irrlicht ogre"
desc_option_irrlicht="Enable support for Irrlicht"
desc_option_ogre="Enable support for Ogre"
build_options_default="ogre"
if [ -z "$CROSS_BUILD" ]; then
# irrlicht interface fails to cross compile
@ -39,7 +40,7 @@ pre_configure() {
cp -p ${FILESDIR}/FindOpenGLES.cmake cmake
# cmake sets standard to c++03 (which doesnt know int16_t)
vsed -i -e "s/-std=c++03//" CMakeLists.txt
sed -i -e "s/-std=c++03//" CMakeLists.txt
}
post_install() {
local _ver2=${version%.*.*}
@ -58,7 +59,7 @@ cegui-doc_package() {
}
}
cegui-devel_package() {
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include