Skip to content

Commit 448eeff

Browse files
committed
Bump cmake_minimum_required version to 3.5
1 parent 1e77386 commit 448eeff

1 file changed

Lines changed: 29 additions & 32 deletions

File tree

CMakeLists.txt

Lines changed: 29 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.1)
1+
cmake_minimum_required(VERSION 3.5)
22
include(GNUInstallDirs)
33

44

@@ -21,47 +21,44 @@ target_sources(array_hash INTERFACE "$<BUILD_INTERFACE:${headers}>")
2121

2222

2323

24-
# Installation (only compatible with CMake version >= 3.3)
25-
if(${CMAKE_VERSION} VERSION_GREATER "3.2")
26-
include(CMakePackageConfigHelpers)
24+
include(CMakePackageConfigHelpers)
2725

28-
## Install include directory
29-
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/tsl"
30-
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
26+
## Install include directory
27+
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/tsl"
28+
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
3129

3230

3331

34-
## Create and install tsl-array-hashConfig.cmake
35-
configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/tsl-array-hashConfig.cmake.in"
36-
"${CMAKE_CURRENT_BINARY_DIR}/tsl-array-hashConfig.cmake"
37-
INSTALL_DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/cmake/tsl-array-hash")
32+
## Create and install tsl-array-hashConfig.cmake
33+
configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/tsl-array-hashConfig.cmake.in"
34+
"${CMAKE_CURRENT_BINARY_DIR}/tsl-array-hashConfig.cmake"
35+
INSTALL_DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/cmake/tsl-array-hash")
3836

39-
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/tsl-array-hashConfig.cmake"
40-
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/cmake/tsl-array-hash")
37+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/tsl-array-hashConfig.cmake"
38+
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/cmake/tsl-array-hash")
4139

4240

4341

44-
## Create and install tsl-array-hashTargets.cmake
45-
install(TARGETS array_hash
46-
EXPORT tsl-array-hashTargets)
42+
## Create and install tsl-array-hashTargets.cmake
43+
install(TARGETS array_hash
44+
EXPORT tsl-array-hashTargets)
4745

48-
install(EXPORT tsl-array-hashTargets
49-
NAMESPACE tsl::
50-
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/cmake/tsl-array-hash")
46+
install(EXPORT tsl-array-hashTargets
47+
NAMESPACE tsl::
48+
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/cmake/tsl-array-hash")
5149

5250

5351

54-
## Create and install tsl-array-hashConfigVersion.cmake
55-
# tsl-array-hash is header-only and does not depend on the architecture.
56-
# Remove CMAKE_SIZEOF_VOID_P from tsl-array-hashConfigVersion.cmake so that a
57-
# tsl-array-hashConfig.cmake generated for a 64 bit target can be used for 32 bit
58-
# targets and vice versa.
59-
set(CMAKE_SIZEOF_VOID_P_BACKUP ${CMAKE_SIZEOF_VOID_P})
60-
unset(CMAKE_SIZEOF_VOID_P)
61-
write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/tsl-array-hashConfigVersion.cmake"
62-
COMPATIBILITY SameMajorVersion)
63-
set(CMAKE_SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P_BACKUP})
52+
## Create and install tsl-array-hashConfigVersion.cmake
53+
# tsl-array-hash is header-only and does not depend on the architecture.
54+
# Remove CMAKE_SIZEOF_VOID_P from tsl-array-hashConfigVersion.cmake so that a
55+
# tsl-array-hashConfig.cmake generated for a 64 bit target can be used for 32 bit
56+
# targets and vice versa.
57+
set(CMAKE_SIZEOF_VOID_P_BACKUP ${CMAKE_SIZEOF_VOID_P})
58+
unset(CMAKE_SIZEOF_VOID_P)
59+
write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/tsl-array-hashConfigVersion.cmake"
60+
COMPATIBILITY SameMajorVersion)
61+
set(CMAKE_SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P_BACKUP})
6462

65-
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/tsl-array-hashConfigVersion.cmake"
66-
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/cmake/tsl-array-hash")
67-
endif()
63+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/tsl-array-hashConfigVersion.cmake"
64+
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/cmake/tsl-array-hash")

0 commit comments

Comments
 (0)