Merge pull request #3466

1d79c14d Revert bb19386b (Howard Chu)
522be96f Fix generating version.cpp (Howard Chu)
This commit is contained in:
Riccardo Spagni 2018-04-12 11:00:14 +02:00
commit 8902ddb91a
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD
2 changed files with 5 additions and 3 deletions

View File

@ -167,7 +167,7 @@ library archives (`.a`).
| Dep | Min. version | Vendored | Debian/Ubuntu pkg | Arch pkg | Fedora | Optional | Purpose | | Dep | Min. version | Vendored | Debian/Ubuntu pkg | Arch pkg | Fedora | Optional | Purpose |
| ------------ | ------------- | -------- | ------------------ | ------------ | ----------------- | -------- | -------------- | | ------------ | ------------- | -------- | ------------------ | ------------ | ----------------- | -------- | -------------- |
| GCC | 4.7.3 | NO | `build-essential` | `base-devel` | `gcc` | NO | | | GCC | 4.7.3 | NO | `build-essential` | `base-devel` | `gcc` | NO | |
| CMake | 3.2.0 | NO | `cmake` | `cmake` | `cmake` | NO | | | CMake | 3.0.0 | NO | `cmake` | `cmake` | `cmake` | NO | |
| pkg-config | any | NO | `pkg-config` | `base-devel` | `pkgconf` | NO | | | pkg-config | any | NO | `pkg-config` | `base-devel` | `pkgconf` | NO | |
| Boost | 1.58 | NO | `libboost-all-dev` | `boost` | `boost-devel` | NO | C++ libraries | | Boost | 1.58 | NO | `libboost-all-dev` | `boost` | `boost-devel` | NO | C++ libraries |
| OpenSSL | basically any | NO | `libssl-dev` | `openssl` | `openssl-devel` | NO | sha256 sum | | OpenSSL | basically any | NO | `libssl-dev` | `openssl` | `openssl-devel` | NO | sha256 sum |

View File

@ -37,14 +37,16 @@ if ("$Format:$" STREQUAL "")
write_static_version_header("release") write_static_version_header("release")
elseif (GIT_FOUND OR Git_FOUND) elseif (GIT_FOUND OR Git_FOUND)
message(STATUS "Found Git: ${GIT_EXECUTABLE}") message(STATUS "Found Git: ${GIT_EXECUTABLE}")
add_custom_target(genversion ALL add_custom_command(
OUTPUT "${CMAKE_BINARY_DIR}/version.cpp"
COMMAND "${CMAKE_COMMAND}" COMMAND "${CMAKE_COMMAND}"
"-D" "GIT=${GIT_EXECUTABLE}" "-D" "GIT=${GIT_EXECUTABLE}"
"-D" "TO=${CMAKE_BINARY_DIR}/version.cpp" "-D" "TO=${CMAKE_BINARY_DIR}/version.cpp"
"-P" "cmake/GenVersion.cmake" "-P" "cmake/GenVersion.cmake"
BYPRODUCTS "${CMAKE_BINARY_DIR}/version.cpp"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}") WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
else() else()
message(STATUS "WARNING: Git was not found!") message(STATUS "WARNING: Git was not found!")
write_static_version_header("unknown") write_static_version_header("unknown")
endif () endif ()
add_custom_target(genversion ALL
DEPENDS "${CMAKE_BINARY_DIR}/version.cpp")