Merge remote-tracking branch 'tgurr/mygui'

This commit is contained in:
Julian Ospald 2022-02-01 21:58:48 +01:00
commit 5596a62f2a
Signed by: hasufell
GPG Key ID: 3786C5262ECB4A3F
3 changed files with 0 additions and 250 deletions

View File

@ -1,168 +0,0 @@
From fbdfac84763ce525e7d243eefbb23c013db93e32 Mon Sep 17 00:00:00 2001
From: Julian Ospald <hasufell@posteo.de>
Date: Tue, 24 May 2016 18:06:54 +0200
Subject: [PATCH] Use GNUInstallDirs
This will probably not make it upstream since they try to
be windows compatible.
---
CMake/ConfigureBuild.cmake | 2 +-
CMake/Utils/MyGUIConfigTargets.cmake | 40 +++++++++++++-------------
CMakeLists.txt | 1 +
MyGUIEngine/CMakeLists.txt | 2 +-
Platforms/OpenGL/OpenGLPlatform/CMakeLists.txt | 2 +-
5 files changed, 24 insertions(+), 23 deletions(-)
diff --git a/CMake/ConfigureBuild.cmake b/CMake/ConfigureBuild.cmake
index 9c6aad9..b655848 100644
--- a/CMake/ConfigureBuild.cmake
+++ b/CMake/ConfigureBuild.cmake
@@ -47,7 +47,7 @@ if (UNIX)
else ()
configure_file(${MYGUI_TEMPLATES_DIR}/MYGUI.pc.in ${MYGUI_BINARY_DIR}/pkgconfig/MYGUI${MYGUI_LIB_SUFFIX}.pc @ONLY)
endif ()
- install(FILES ${MYGUI_BINARY_DIR}/pkgconfig/MYGUI${MYGUI_LIB_SUFFIX}.pc DESTINATION lib/pkgconfig)
+ install(FILES ${MYGUI_BINARY_DIR}/pkgconfig/MYGUI${MYGUI_LIB_SUFFIX}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
# configure additional packages
diff --git a/CMake/Utils/MyGUIConfigTargets.cmake b/CMake/Utils/MyGUIConfigTargets.cmake
index d48d2a3..61b80a5 100644
--- a/CMake/Utils/MyGUIConfigTargets.cmake
+++ b/CMake/Utils/MyGUIConfigTargets.cmake
@@ -60,27 +60,27 @@ endfunction(mygui_create_vcproj_userfile)
# install targets according to current build type
function(mygui_install_target TARGETNAME SUFFIX)
install(TARGETS ${TARGETNAME}
- RUNTIME DESTINATION "bin${MYGUI_RELEASE_PATH}" CONFIGURATIONS Release None ""
- LIBRARY DESTINATION "lib${MYGUI_LIB_RELEASE_PATH}${SUFFIX}" CONFIGURATIONS Release None ""
- ARCHIVE DESTINATION "lib${MYGUI_LIB_RELEASE_PATH}${SUFFIX}" CONFIGURATIONS Release None ""
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}${MYGUI_RELEASE_PATH}" CONFIGURATIONS Release None ""
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${MYGUI_LIB_RELEASE_PATH}${SUFFIX}" CONFIGURATIONS Release None ""
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${MYGUI_LIB_RELEASE_PATH}${SUFFIX}" CONFIGURATIONS Release None ""
FRAMEWORK DESTINATION "${MYGUI_FRAMEWORK_PATH}" CONFIGURATIONS Release None ""
)
install(TARGETS ${TARGETNAME}
- RUNTIME DESTINATION "bin${MYGUI_RELWDBG_PATH}" CONFIGURATIONS RelWithDebInfo
- LIBRARY DESTINATION "lib${MYGUI_LIB_RELWDBG_PATH}${SUFFIX}" CONFIGURATIONS RelWithDebInfo
- ARCHIVE DESTINATION "lib${MYGUI_LIB_RELWDBG_PATH}${SUFFIX}" CONFIGURATIONS RelWithDebInfo
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}${MYGUI_RELWDBG_PATH}" CONFIGURATIONS RelWithDebInfo
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${MYGUI_LIB_RELWDBG_PATH}${SUFFIX}" CONFIGURATIONS RelWithDebInfo
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${MYGUI_LIB_RELWDBG_PATH}${SUFFIX}" CONFIGURATIONS RelWithDebInfo
FRAMEWORK DESTINATION "${MYGUI_FRAMEWORK_PATH}" CONFIGURATIONS RelWithDebInfo
)
install(TARGETS ${TARGETNAME}
- RUNTIME DESTINATION "bin${MYGUI_MINSIZE_PATH}" CONFIGURATIONS MinSizeRel
- LIBRARY DESTINATION "lib${MYGUI_LIB_MINSIZE_PATH}${SUFFIX}" CONFIGURATIONS MinSizeRel
- ARCHIVE DESTINATION "lib${MYGUI_LIB_MINSIZE_PATH}${SUFFIX}" CONFIGURATIONS MinSizeRel
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}${MYGUI_MINSIZE_PATH}" CONFIGURATIONS MinSizeRel
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${MYGUI_LIB_MINSIZE_PATH}${SUFFIX}" CONFIGURATIONS MinSizeRel
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${MYGUI_LIB_MINSIZE_PATH}${SUFFIX}" CONFIGURATIONS MinSizeRel
FRAMEWORK DESTINATION "${MYGUI_FRAMEWORK_PATH}" CONFIGURATIONS MinSizeRel
)
install(TARGETS ${TARGETNAME}
- RUNTIME DESTINATION "bin${MYGUI_DEBUG_PATH}" CONFIGURATIONS Debug
- LIBRARY DESTINATION "lib${MYGUI_LIB_DEBUG_PATH}${SUFFIX}" CONFIGURATIONS Debug
- ARCHIVE DESTINATION "lib${MYGUI_LIB_DEBUG_PATH}${SUFFIX}" CONFIGURATIONS Debug
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}${MYGUI_DEBUG_PATH}" CONFIGURATIONS Debug
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${MYGUI_LIB_DEBUG_PATH}${SUFFIX}" CONFIGURATIONS Debug
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${MYGUI_LIB_DEBUG_PATH}${SUFFIX}" CONFIGURATIONS Debug
FRAMEWORK DESTINATION "${MYGUI_FRAMEWORK_PATH}" CONFIGURATIONS Debug
)
endfunction(mygui_install_target)
@@ -364,11 +364,11 @@ function(mygui_install_app PROJECTNAME)
if (MYGUI_INSTALL_PDB)
# install debug pdb files
install(FILES ${MYGUI_BINARY_DIR}/bin${MYGUI_DEBUG_PATH}/${PROJECTNAME}.pdb
- DESTINATION bin${MYGUI_DEBUG_PATH}
+ DESTINATION ${CMAKE_INSTALL_BINDIR}${MYGUI_DEBUG_PATH}
CONFIGURATIONS Debug
)
install(FILES ${MYGUI_BINARY_DIR}/bin${MYGUI_RELWDBG_PATH}/${PROJECTNAME}.pdb
- DESTINATION bin${MYGUI_RELWDBG_PATH}
+ DESTINATION ${CMAKE_INSTALL_BINDIR}${MYGUI_RELWDBG_PATH}
CONFIGURATIONS RelWithDebInfo
)
endif ()
@@ -400,7 +400,7 @@ function(mygui_plugin PROJECTNAME)
set_target_properties(${PROJECTNAME} PROPERTIES PREFIX "")
install(FILES ${HEADER_FILES}
- DESTINATION include/MYGUI
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/MYGUI
)
endfunction(mygui_plugin)
@@ -431,20 +431,20 @@ function(mygui_config_lib PROJECTNAME)
# install debug pdb files
if (MYGUI_STATIC)
install(FILES ${MYGUI_BINARY_DIR}/lib${MYGUI_LIB_DEBUG_PATH}/${PROJECTNAME}Static_d.pdb
- DESTINATION lib${MYGUI_LIB_DEBUG_PATH}
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}${MYGUI_LIB_DEBUG_PATH}
CONFIGURATIONS Debug
)
install(FILES ${MYGUI_BINARY_DIR}/lib${MYGUI_LIB_RELWDBG_PATH}/${PROJECTNAME}Static.pdb
- DESTINATION lib${MYGUI_LIB_RELWDBG_PATH}
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}${MYGUI_LIB_RELWDBG_PATH}
CONFIGURATIONS RelWithDebInfo
)
else ()
install(FILES ${MYGUI_BINARY_DIR}/bin${MYGUI_DEBUG_PATH}/${PROJECTNAME}_d.pdb
- DESTINATION bin${MYGUI_DEBUG_PATH}
+ DESTINATION ${CMAKE_INSTALL_BINDIR}${MYGUI_DEBUG_PATH}
CONFIGURATIONS Debug
)
install(FILES ${MYGUI_BINARY_DIR}/bin${MYGUI_RELWDBG_PATH}/${PROJECTNAME}.pdb
- DESTINATION bin${MYGUI_RELWDBG_PATH}
+ DESTINATION ${CMAKE_INSTALL_BINDIR}${MYGUI_RELWDBG_PATH}
CONFIGURATIONS RelWithDebInfo
)
endif ()
@@ -459,7 +459,7 @@ function(mygui_config_sample PROJECTNAME)
# set install RPATH for Unix systems
if (UNIX AND MYGUI_FULL_RPATH)
set_property(TARGET ${PROJECTNAME} APPEND PROPERTY
- INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
+ INSTALL_RPATH ${CMAKE_INSTALL_LIBDIR})
set_property(TARGET ${PROJECTNAME} PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
endif ()
endfunction(mygui_config_sample)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9fc5694..0cddafa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,6 +17,7 @@ set(CMAKE_MODULE_PATH
"${MYGUI_SOURCE_DIR}/CMake/Utils"
"${MYGUI_SOURCE_DIR}/CMake/Packages"
)
+include(GNUInstallDirs)
include(CMakeDependentOption)
include(MacroLogFeature)
include(MyGUIConfigTargets)
diff --git a/MyGUIEngine/CMakeLists.txt b/MyGUIEngine/CMakeLists.txt
index c5eab54..839ff43 100644
--- a/MyGUIEngine/CMakeLists.txt
+++ b/MyGUIEngine/CMakeLists.txt
@@ -64,5 +64,5 @@ endif ()
# install MyGUIEngine headers
install(FILES ${HEADER_FILES}
- DESTINATION include/MYGUI
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/MYGUI"
)
diff --git a/Platforms/OpenGL/OpenGLPlatform/CMakeLists.txt b/Platforms/OpenGL/OpenGLPlatform/CMakeLists.txt
index 169ad05..4bd7cd1 100644
--- a/Platforms/OpenGL/OpenGLPlatform/CMakeLists.txt
+++ b/Platforms/OpenGL/OpenGLPlatform/CMakeLists.txt
@@ -30,7 +30,7 @@ link_directories(${OPENGL_LIB_DIR} ${PNG_LIBRARY})
# installation rules
install(FILES ${HEADER_FILES}
- DESTINATION include/MYGUI
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/MYGUI
)
mygui_install_target(${PROJECTNAME} "")
--
2.8.3

View File

@ -1,21 +0,0 @@
From: Julian Ospald <hasufell@gentoo.org>
Date: Fri Jun 15 10:42:42 UTC 2012
Subject: build system
Upstream: no
fix underlinking
--- MyGUIEngine/CMakeLists.txt
+++ MyGUIEngine/CMakeLists.txt
@@ -48,7 +48,10 @@
if (MYGUI_USE_FREETYPE)
target_link_libraries(${PROJECTNAME}
${FREETYPE_LIBRARIES}
- )
+ dl)
+else()
+ target_link_libraries(${PROJECTNAME}
+ dl)
endif()
# platform specific dependencies

View File

@ -1,61 +0,0 @@
# Copyright 2016 Julian Ospald <hasufell@posteo.de>
# Distributed under the terms of the GNU General Public License v2
MY_PNV=MyGUI${PV}
WORK="${WORKBASE}/${PN}-${MY_PNV}"
require cmake [ api=2 ]
require github [ user=MyGUI tag=${MY_PNV} ]
SUMMARY="A library for creating GUIs for games"
HOMEPAGE="http://mygui.info/"
LICENCES="MIT"
SLOT="0"
PLATFORMS="~amd64 ~x86"
DEPENDENCIES="
build:
virtual/pkg-config
build+run:
media-libs/freetype:2
media-libs/glew
x11-dri/mesa
"
DEFAULT_SRC_PREPARE_PATCHES=(
-p0 "${FILES}"/${PNV}-underlinking.patch
-p1 "${FILES}"/${PNV}-Use-GNUInstallDirs.patch
)
CMAKE_SRC_CONFIGURE_PARAMS=(
-DCMAKE_INSTALL_BINDIR="/usr$(exhost --target)/bin"
-DCMAKE_INSTALL_INCLUDEDIR="/usr/$(exhost --target)/include"
-DCMAKE_INSTALL_LIBDIR="/usr/$(exhost --target)/lib"
-DCMAKE_INSTALL_PREFIX="/usr"
-DMYGUI_BUILD_DEMOS=OFF
-DMYGUI_BUILD_DOCS=OFF
-DMYGUI_BUILD_PLUGINS=ON
-DMYGUI_BUILD_TOOLS=OFF
-DCMAKE_BUILD_TYPE=Release
-DMYGUI_BUILD_WRAPPER=OFF
-DMYGUI_INSTALL_DOCS=OFF
-DMYGUI_INSTALL_MEDIA=ON
-DMYGUI_INSTALL_SAMPLES=OFF
-DMYGUI_INSTALL_TOOLS=OFF
-DMYGUI_RENDERSYSTEM=4
-DMYGUI_STATIC=OFF
-DMYGUI_USE_FREETYPE=ON
-DMYGUI_USE_SYSTEM_GLEW=ON
)
src_install() {
cmake_src_install
# test media not needed at runtime
edo rm -r "${IMAGE}"/usr/share/MYGUI/Media/UnitTests
# wrapper not available for linux, remove related media
edo rm -r "${IMAGE}"/usr/share/MYGUI/Media/Wrapper
}