Skip to content

Commit 5bee223

Browse files
committed
build: Add CPM and remove extern
1 parent 37e9e4c commit 5bee223

File tree

5 files changed

+1169
-29
lines changed

5 files changed

+1169
-29
lines changed

CMakeLists.txt

+8-5
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,23 @@ project(efp_logger VERSION 0.1.0 LANGUAGES C CXX)
44
set(CMAKE_CXX_STANDARD 11)
55
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
66

7-
include(CTest)
8-
enable_testing()
9-
107
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
118
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
129
include(CPack)
1310

11+
include(cmake/CPM.cmake)
12+
13+
CPMAddPackage("gh:cwahn/efp#v0.1.0-rc.3")
14+
CPMAddPackage("gh:fmtlib/fmt#10.2.1")
15+
1416
add_library(efp_logger INTERFACE)
1517
target_include_directories(efp_logger INTERFACE include)
1618
target_link_libraries(efp_logger INTERFACE efp fmt::fmt)
1719

18-
add_subdirectory(extern)
19-
2020
# Only if the project is the top-most project
2121
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
22+
include(CTest)
23+
enable_testing()
24+
2225
add_subdirectory(example)
2326
endif()

0 commit comments

Comments
 (0)