generated from threeal/cmake-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
36 lines (30 loc) · 879 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
cmake_minimum_required(VERSION 3.21)
project(
GitCheckout
VERSION 1.1.0
DESCRIPTION "Clone and check out a Git repository from a CMake project"
HOMEPAGE_URL https://github.com/threeal/git-checkout-cmake
LANGUAGES NONE
)
option(GIT_CHECKOUT_ENABLE_TESTS "Enable test targets.")
option(GIT_CHECKOUT_ENABLE_INSTALL "Enable install targets."
"${PROJECT_IS_TOP_LEVEL}")
include(cmake/GitCheckout.cmake)
if(GIT_CHECKOUT_ENABLE_TESTS)
enable_testing()
add_subdirectory(test)
endif()
if(GIT_CHECKOUT_ENABLE_INSTALL)
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
GitCheckoutConfigVersion.cmake
COMPATIBILITY SameMajorVersion
)
install(
FILES
cmake/GitCheckout.cmake
cmake/GitCheckoutConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/GitCheckoutConfigVersion.cmake
DESTINATION lib/cmake/GitCheckout
)
endif()