Support CMake 3.12.
Ubuntu 20.04 has 3.16, so requiring 3.17 is a bit mean.
This commit is contained in:
parent
8dfafae025
commit
acb9f4d975
|
@ -42,10 +42,10 @@ steps:
|
||||||
- name: debian-package-cache
|
- name: debian-package-cache
|
||||||
path: /var/cache/apt/archives
|
path: /var/cache/apt/archives
|
||||||
|
|
||||||
- name: Download CMake 3.17 installer
|
- name: Download CMake 3.12 installer
|
||||||
image: plugins/download
|
image: plugins/download
|
||||||
settings:
|
settings:
|
||||||
source: https://cmake.org/files/v3.17/cmake-3.17.0-Linux-x86_64.sh
|
source: https://cmake.org/files/v3.12/cmake-3.12.0-Linux-x86_64.sh
|
||||||
destination: cmake_installer.sh
|
destination: cmake_installer.sh
|
||||||
|
|
||||||
- name: GCC 7 / clang 6
|
- name: GCC 7 / clang 6
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
cmake_minimum_required(VERSION 3.17...3.18)
|
cmake_minimum_required(VERSION 3.12...3.18)
|
||||||
|
|
||||||
# Global build options.
|
# Global build options.
|
||||||
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "The type of build.")
|
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "The type of build.")
|
||||||
|
|
|
@ -43,7 +43,7 @@ image::https://repology.org/badge/vertical-allrepos/epubgrep.svg[]
|
||||||
* Tested OS: Linux
|
* Tested OS: Linux
|
||||||
* C\++ compiler with C++17 support (tested: link:{uri-gcc}[GCC] 7/10,
|
* C\++ compiler with C++17 support (tested: link:{uri-gcc}[GCC] 7/10,
|
||||||
link:{uri-clang}[clang] 6/11)
|
link:{uri-clang}[clang] 6/11)
|
||||||
* link:{uri-cmake}[CMake] (at least: 3.17)
|
* link:{uri-cmake}[CMake] (at least: 3.12)
|
||||||
* link:{uri-boost}[Boost] (tested: 1.75.0 / 1.65.0)
|
* link:{uri-boost}[Boost] (tested: 1.75.0 / 1.65.0)
|
||||||
* link:{uri-gettext}[gettext] (tested: 0.21 / 0.19)
|
* link:{uri-gettext}[gettext] (tested: 0.21 / 0.19)
|
||||||
* link:{uri-libarchive}[libarchive] (tested: 3.5 / 3.2)
|
* link:{uri-libarchive}[libarchive] (tested: 3.5 / 3.2)
|
||||||
|
|
|
@ -21,9 +21,18 @@ target_link_libraries(${PROJECT_NAME}_lib
|
||||||
Boost::program_options
|
Boost::program_options
|
||||||
Boost::regex
|
Boost::regex
|
||||||
std::filesystem
|
std::filesystem
|
||||||
LibArchive::LibArchive
|
|
||||||
fmt::fmt)
|
fmt::fmt)
|
||||||
|
|
||||||
|
if(${CMAKE_VERSION} VERSION_LESS 3.17)
|
||||||
|
target_link_libraries(${PROJECT_NAME}_lib
|
||||||
|
PUBLIC ${LibArchive_LIBRARIES})
|
||||||
|
target_include_directories(${PROJECT_NAME}_lib
|
||||||
|
PUBLIC ${LibArchive_INCLUDE_DIRS})
|
||||||
|
else()
|
||||||
|
target_link_libraries(${PROJECT_NAME}_lib
|
||||||
|
PUBLIC LibArchive::LibArchive)
|
||||||
|
endif()
|
||||||
|
|
||||||
target_include_directories(${PROJECT_NAME}_lib
|
target_include_directories(${PROJECT_NAME}_lib
|
||||||
PUBLIC
|
PUBLIC
|
||||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>"
|
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user