File tree Expand file tree Collapse file tree 5 files changed +24
-43
lines changed
Expand file tree Collapse file tree 5 files changed +24
-43
lines changed Original file line number Diff line number Diff line change 1616#
1717# =========================== LICENSE =================================
1818
19- cmake_minimum_required (VERSION 3.13 )
19+ cmake_minimum_required (VERSION 3.14...4.0 )
2020
2121# Project call
2222include ("${CMAKE_CURRENT_LIST_DIR} /udpcap/version.cmake" )
Original file line number Diff line number Diff line change 11include (FetchContent)
22FetchContent_Declare(GTest
33 GIT_REPOSITORY https://github.com/google/googletest.git
4- GIT_TAG origin/v1.14.x # This is not a Tag, but the release branch
5- CONFIGURE_COMMAND ""
6- BUILD_COMMAND ""
4+ GIT_TAG origin/v1.16.x # This is not a Tag, but the release branch
5+ DOWNLOAD_EXTRACT_TIMESTAMP FALSE
76 )
8- FetchContent_GetProperties(GTest)
9- if (NOT gtest_POPULATED)
10- message (STATUS "Fetching GTest..." )
11- FetchContent_Populate(GTest)
12- endif ()
7+
8+ message (STATUS "Fetching GTest..." )
9+ FetchContent_MakeAvailable(GTest)
10+
1311set (GTest_ROOT_DIR "${gtest_SOURCE_DIR} " )
1412
1513# Googletest automatically forces MT instead of MD if we do not set this option.
@@ -19,15 +17,5 @@ if(MSVC)
1917 set (INSTALL_GTEST OFF CACHE BOOL "My option" FORCE)
2018endif ()
2119
22- add_subdirectory ("${GTest_ROOT_DIR} " EXCLUDE_FROM_ALL )
23-
24- if (NOT TARGET GTest::gtest)
25- add_library (GTest::gtest ALIAS gtest)
26- endif ()
27-
28- if (NOT TARGET GTest::gtest_main)
29- add_library (GTest::gtest_main ALIAS gtest_main)
30- endif ()
31-
3220# Prepend googletest-module/FindGTest.cmake to Module Path
3321list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR} /Modules/" )
Original file line number Diff line number Diff line change 11include (FetchContent)
22FetchContent_Declare(asio
3- GIT_REPOSITORY https://github.com/chriskohlhoff/asio.git
4- GIT_TAG asio-1-24-0
5- CONFIGURE_COMMAND ""
6- BUILD_COMMAND ""
7- )
8- FetchContent_GetProperties(asio)
9- if (NOT asio_POPULATED)
10- message (STATUS "Fetching asio..." )
11- FetchContent_Populate(asio)
12- endif ()
3+ GIT_REPOSITORY https://github.com/chriskohlhoff/asio.git
4+ GIT_TAG asio-1-24-0
5+ DOWNLOAD_EXTRACT_TIMESTAMP FALSE
6+ )
7+
8+ message (STATUS "Fetching asio..." )
9+ FetchContent_MakeAvailable(asio)
10+
1311set (asio_ROOT_DIR "${asio_SOURCE_DIR} " )
1412list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR} /Modules/)
Original file line number Diff line number Diff line change @@ -7,13 +7,11 @@ include(FetchContent)
77FetchContent_Declare(npcap_sdk
88 URL "${NPCAP_SDK_ARCHIVE_URL} "
99 URL_HASH "${NPCAP_SDK_ARCHIVE_HASH} "
10- CONFIGURE_COMMAND ""
11- BUILD_COMMAND ""
10+ DOWNLOAD_EXTRACT_TIMESTAMP FALSE
1211 )
13- FetchContent_GetProperties(npcap_sdk)
14- if (NOT npcap-sdk_POPULATED)
15- message (STATUS "Fetching npcap_sdk..." )
16- FetchContent_Populate(npcap_sdk)
17- endif ()
12+
13+ message (STATUS "Fetching npcap_sdk..." )
14+ FetchContent_MakeAvailable(npcap_sdk)
15+
1816set (npcap_ROOT_DIR "${npcap_sdk_SOURCE_DIR} " )
1917list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR} /Modules/)
Original file line number Diff line number Diff line change @@ -7,13 +7,10 @@ include(FetchContent)
77FetchContent_Declare(pcapplusplus
88 URL "${PCAPPLUSPLUS_ARCHIVE_URL} "
99 URL_HASH "${PCAPPLUSPLUS_ARCHIVE_HASH} "
10- CONFIGURE_COMMAND ""
11- BUILD_COMMAND ""
1210 )
13- FetchContent_GetProperties(pcapplusplus)
14- if (NOT pcapplusplus_POPULATED)
15- message (STATUS "Fetching Pcap++..." )
16- FetchContent_Populate(pcapplusplus)
17- endif ()
11+
12+ message (STATUS "Fetching Pcap++..." )
13+ FetchContent_MakeAvailable(pcapplusplus)
14+
1815set (pcapplusplus_ROOT_DIR "${pcapplusplus_SOURCE_DIR} " )
1916list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR} /Modules/)
You can’t perform that action at this time.
0 commit comments