-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
45 additions
and
36 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
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 @@ | ||
option(LIBCGSS_LIBRARY_VERSION "Library version. Leave it empty or provide a four-part version string (major.minor.patch.tweak)." "") |
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 |
---|---|---|
@@ -1,23 +1,22 @@ | ||
if ($ENV{CI}) | ||
if (DEFINED ENV{LIBCGSS_VERSION_MAJOR) | ||
string(LENGTH $ENV{LIBCGSS_VERSION_MAJOR} VERSION_INFO_LENGTH) | ||
string(LENGTH LIBCGSS_LIBRARY_VERSION VERSION_INFO_LENGTH) | ||
|
||
if (VERSION_INFO_LENGTH GREATER 0) | ||
# If we are in a CI environment, load version info from environment variables (see configure-cmake.ps1) | ||
set(PROJECT_VERSION_MAJOR $ENV{LIBCGSS_VERSION_MAJOR}) | ||
set(PROJECT_VERSION_MINOR $ENV{LIBCGSS_VERSION_MINOR}) | ||
set(PROJECT_VERSION_PATCH $ENV{LIBCGSS_VERSION_PATCH}) | ||
set(PROJECT_VERSION_TWEAK $ENV{LIBCGSS_VERSION_TWEAK}) | ||
if (VERSION_INFO_LENGTH GREATER 0) | ||
string(REPLACE "." ";" VERSION_COMPONENTS ${LIBCGSS_LIBRARY_VERSION}) | ||
|
||
set_target_properties(cgss | ||
PROPERTIES | ||
VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}.${PROJECT_VERSION_TWEAK}" | ||
SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}" | ||
) | ||
else () | ||
message(WARNING "Warning: CI environment detected but libcgss version is empty.") | ||
endif () | ||
# If we are in a CI environment, load version info from environment variables (see configure-cmake.ps1) | ||
list(GET VERSION_COMPONENTS 0 PROJECT_VERSION_MAJOR) | ||
list(GET VERSION_COMPONENTS 1 PROJECT_VERSION_MINOR) | ||
list(GET VERSION_COMPONENTS 2 PROJECT_VERSION_PATCH) | ||
# Always 0 | ||
set(PROJECT_VERSION_TWEAK 0) | ||
|
||
set_target_properties(cgss | ||
PROPERTIES | ||
VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}.${PROJECT_VERSION_TWEAK}" | ||
SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}" | ||
) | ||
else () | ||
message(WARNING "Warning: CI environment detected but libcgss version is not defined.") | ||
message(WARNING "Warning: CI environment detected but libcgss version is empty.") | ||
endif () | ||
endif () |
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 was deleted.
Oops, something went wrong.