-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[cmake] download instead of bundle gl2ps and bump from 1.3.1 to 1.4.2, and use CMake target #21895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
c2a5985
[cmake] download instead of bundle gl2ps and bump from 1.3.1 to 1.4.2…
ferdymercury 03f0940
[gl2ps] fix hash
ferdymercury d564309
[gl2ps] also unset var
ferdymercury 3ff6060
Update CMakeLists.txt
ferdymercury aaa246f
Update CMakeLists.txt
ferdymercury b6478b1
[ci] turn on builtin_xxhash for CI testing on Linux
ferdymercury 1d10983
Update SearchInstalledSoftware.cmake
ferdymercury bd853e3
[gl2ps] fixes for win32 static build
ferdymercury 16360cf
add patch file for v1.4.2
ferdymercury 4b62fa6
[gl2ps] try simplification
ferdymercury File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,65 @@ | ||
| # Copyright (C) 1995-2026, Rene Brun and Fons Rademakers. | ||
| # All rights reserved. | ||
| # | ||
| # For the licensing terms see $ROOTSYS/LICENSE. | ||
| # For the list of contributors see $ROOTSYS/README/CREDITS. | ||
|
|
||
| # **PLEASE UPDATE ALSO THE FOLLOWING LINE WHEN UPDATING THE VERSION** | ||
| # 30 Apr 2020, https://gitlab.onelab.info/gl2ps/gl2ps/-/releases/gl2ps_1_4_2 | ||
| set(ROOT_GL2PS_VERSION 1.4.2) | ||
| set(ROOT_GL2PS_HASH "8d1c00c1018f96b4b97655482e57dcb0ce42ae2f1d349cd6d4191e7848d9ffe9") | ||
| # Backport fix for static Win32 having being overwritten by shared lib: https://gitlab.onelab.info/gl2ps/gl2ps/-/work_items/30 | ||
| # We use all seven commits between 1.4.2 and before bump to 1.4.3 | ||
| set(ROOT_GL2PS_PATCH_FILE ${CMAKE_CURRENT_SOURCE_DIR}/v142_post_tag_fixes.patch) | ||
|
|
||
| set(ROOT_GL2PS_PREFIX ${CMAKE_BINARY_DIR}/builtins/GL2PS-prefix) | ||
|
|
||
| set(ROOT_GL2PS_LIBRARY ${ROOT_GL2PS_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}gl2ps${CMAKE_STATIC_LIBRARY_SUFFIX} | ||
| ) | ||
|
|
||
| if(WIN32 AND NOT CMAKE_GENERATOR MATCHES Ninja) | ||
| if(winrtdebug) | ||
| set(ROOT_GL2PS_BUILD_COMMAND_FLAGS "--config Debug") | ||
| else() | ||
| set(ROOT_GL2PS_BUILD_COMMAND_FLAGS "--config $<IF:$<CONFIG:Debug,RelWithDebInfo>,RelWithDebInfo,Release>") | ||
| endif() | ||
| endif() | ||
|
|
||
| ExternalProject_Add( | ||
| BUILTIN_GL2PS | ||
| PREFIX ${ROOT_GL2PS_PREFIX} | ||
| URL ${lcgpackages}/gl2ps-${ROOT_GL2PS_VERSION}.tgz | ||
| URL_HASH SHA256=${ROOT_GL2PS_HASH} | ||
| PATCH_COMMAND git apply ${ROOT_GL2PS_PATCH_FILE} | ||
| CMAKE_ARGS -G ${CMAKE_GENERATOR} | ||
| -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} | ||
| -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> | ||
| -DCMAKE_POSITION_INDEPENDENT_CODE=ON | ||
| -DCMAKE_C_VISIBILITY_PRESET=hidden | ||
| -DCMAKE_POLICY_VERSION_MINIMUM=3.5 | ||
| -DENABLE_PNG=OFF | ||
| -DENABLE_ZLIB=OFF | ||
| -DBUILD_SHARED_LIBS=OFF | ||
| BUILD_COMMAND ${CMAKE_COMMAND} --build . ${ROOT_GL2PS_BUILD_COMMAND_FLAGS} | ||
| INSTALL_COMMAND ${CMAKE_COMMAND} --build . ${ROOT_GL2PS_BUILD_COMMAND_FLAGS} --target install | ||
| LOG_DOWNLOAD 1 | ||
| LOG_CONFIGURE 1 | ||
| LOG_BUILD 1 | ||
| LOG_INSTALL 1 | ||
| LOG_OUTPUT_ON_FAILURE 1 | ||
| BUILD_BYPRODUCTS ${ROOT_GL2PS_LIBRARY} | ||
| TIMEOUT 600) | ||
|
|
||
| file(MAKE_DIRECTORY ${ROOT_GL2PS_PREFIX}/include) | ||
| add_library(gl2ps::gl2ps IMPORTED STATIC GLOBAL) | ||
| add_dependencies(gl2ps::gl2ps BUILTIN_GL2PS) | ||
| set_target_properties(gl2ps::gl2ps PROPERTIES | ||
| IMPORTED_LOCATION ${ROOT_GL2PS_LIBRARY} | ||
| INTERFACE_INCLUDE_DIRECTORIES ${ROOT_GL2PS_PREFIX}/include) | ||
|
|
||
| # Set the canonical output of find_package according to | ||
| # https://cmake.org/cmake/help/latest/manual/cmake-developer.7.html#standard-variable-names | ||
| set(gl2ps_INCLUDE_DIRS ${ROOT_GL2PS_PREFIX}/include PARENT_SCOPE) | ||
| set(gl2ps_LIBRARIES ${ROOT_GL2PS_LIBRARY} PARENT_SCOPE) | ||
| set(gl2ps_FOUND TRUE PARENT_SCOPE) | ||
| set(gl2ps_VERSION ${ROOT_GL2PS_VERSION} PARENT_SCOPE) | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.