Skip to content

Commit 99ac23c

Browse files
committed
Update cmakelists
1 parent 5636318 commit 99ac23c

File tree

2 files changed

+18
-19
lines changed

2 files changed

+18
-19
lines changed

external/fakeit/CMakeLists.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
cmake_minimum_required(VERSION 3.2.2)
1+
cmake_minimum_required(VERSION 3.14)
22
project(fakeit VERSION 2.4.0 LANGUAGES CXX)
33

4-
include(git-download)
4+
include(FetchContent)
55

6-
set(REPO_DIR ${PROJECT_SOURCE_DIR}/${PROJECT_NAME}-repo)
7-
8-
download_repo(
9-
URL "https://github.com/eranpeer/FakeIt.git"
10-
TAG ${PROJECT_VERSION}
11-
CLONE_DIR ${REPO_DIR}
6+
FetchContent_Declare(
7+
fakeit_repo
8+
GIT_REPOSITORY https://github.com/eranpeer/FakeIt.git
9+
GIT_TAG ${PROJECT_VERSION}
1210
)
1311

12+
FetchContent_MakeAvailable(fakeit_repo)
13+
1414
add_library(${PROJECT_NAME} INTERFACE)
1515

1616
target_include_directories(${PROJECT_NAME} INTERFACE
17-
${REPO_DIR}/single_header/standalone/
17+
${fakeit_repo_SOURCE_DIR}/single_header/standalone/
1818
)

external/unity/CMakeLists.txt

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1-
cmake_minimum_required(VERSION 3.2.2)
1+
cmake_minimum_required(VERSION 3.14)
22
project(unity VERSION 2.4.1 LANGUAGES C)
33

4-
include(git-download)
4+
include(FetchContent)
55

6-
set(REPO_DIR ${PROJECT_SOURCE_DIR}/${PROJECT_NAME}-repo)
7-
8-
download_repo(
9-
URL "https://github.com/ThrowTheSwitch/Unity.git"
10-
TAG v${PROJECT_VERSION}
11-
CLONE_DIR ${REPO_DIR}
6+
FetchContent_Declare(
7+
unity_repo
8+
GIT_REPOSITORY https://github.com/ThrowTheSwitch/Unity.git
9+
GIT_TAG v${PROJECT_VERSION}
1210
)
11+
FetchContent_MakeAvailable(unity_repo)
1312

1413
add_library(${PROJECT_NAME} STATIC
15-
${REPO_DIR}/src/unity.c
14+
${unity_repo_SOURCE_DIR}/src/unity.c
1615
)
1716

1817
target_include_directories(${PROJECT_NAME} PUBLIC
19-
${REPO_DIR}/src
18+
${unity_repo_SOURCE_DIR}/src
2019
)

0 commit comments

Comments
 (0)