pineapple/externals/vcpkg/ports/allegro5/export-targets.patch
2022-07-23 03:01:36 +02:00

52 lines
2.3 KiB
Diff
Executable file

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7c5720b..72880c4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1156,6 +1156,24 @@ if(INSTALL_PKG_CONFIG_FILES)
endforeach(versuffix)
endif(INSTALL_PKG_CONFIG_FILES)
+file(WRITE "${CMAKE_INSTALL_PREFIX}/share/unofficial-allegro5/unofficial-allegro5-config.cmake"
+[[
+include("${CMAKE_CURRENT_LIST_DIR}/unofficial-allegroTargets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/unofficial-allegro_audioTargets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/unofficial-allegro_videoTargets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/unofficial-allegro_primitivesTargets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/unofficial-allegro_fontTargets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/unofficial-allegro_ttfTargets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/unofficial-allegro_memfileTargets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/unofficial-allegro_physfsTargets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/unofficial-allegro_imageTargets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/unofficial-allegro_mainTargets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/unofficial-allegro_dialogTargets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/unofficial-allegro_colorTargets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/unofficial-allegro_acodecTargets.cmake")
+
+]])
+
#-----------------------------------------------------------------------------#
#
# Documentation
diff --git a/cmake/Common.cmake b/cmake/Common.cmake
index 74edef8..0cf1edb 100644
--- a/cmake/Common.cmake
+++ b/cmake/Common.cmake
@@ -220,6 +220,7 @@ endfunction(set_our_framework_properties)
function(install_our_library target filename)
install(TARGETS ${target}
+ EXPORT unofficial-${target}Targets
LIBRARY DESTINATION "lib${LIB_SUFFIX}"
ARCHIVE DESTINATION "lib${LIB_SUFFIX}"
FRAMEWORK DESTINATION "${FRAMEWORK_INSTALL_PREFIX}"
@@ -227,6 +228,10 @@ function(install_our_library target filename)
# Doesn't work, see below.
# PUBLIC_HEADER DESTINATION "include"
)
+ install(EXPORT unofficial-${target}Targets
+ NAMESPACE unofficial-allegro5::
+ DESTINATION share/unofficial-allegro5
+ )
if(0)
install(FILES ${CMAKE_BINARY_DIR}/lib/${filename}.pdb
DESTINATION lib