-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[allergo5] Export cmake targets, disable install pdbs to lib (#19493)
* [allergo5] Export cmake targets, disable install pdbs to lib * version * apply suggestions * version * Re-generate targets * version * Apply suggestions * version
- Loading branch information
Showing
6 changed files
with
92 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/cmake/Common.cmake b/cmake/Common.cmake | ||
index 86c194f..74edef8 100644 | ||
--- a/cmake/Common.cmake | ||
+++ b/cmake/Common.cmake | ||
@@ -227,7 +227,7 @@ function(install_our_library target filename) | ||
# Doesn't work, see below. | ||
# PUBLIC_HEADER DESTINATION "include" | ||
) | ||
- if(MSVC AND BUILD_SHARED_LIBS) | ||
+ if(0) | ||
install(FILES ${CMAKE_BINARY_DIR}/lib/${filename}.pdb | ||
DESTINATION lib | ||
CONFIGURATIONS Debug RelWithDebInfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters