-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
49 lines (37 loc) · 1.33 KB
/
Copy pathCMakeLists.txt
File metadata and controls
49 lines (37 loc) · 1.33 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
cmake_minimum_required(VERSION 3.10)
project(EnergyPriceApp)
set(CMAKE_CXX_STANDARD 17)
# Include Conan build info
#include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
#conan_basic_setup()
find_package(curl REQUIRED)
find_package(nlohmann_json REQUIRED)
#include_directories(${nlohmann_json_INCLUDE_DIRS})
include_directories(src/models)
include_directories(src/utils)
include_directories(src/api)
file(GLOB SOURCES
src/main.cpp
src/api/energy_price_fetcher.cpp
src/api/european_data_api.cpp
src/models/energy_price_collection.h
src/models/energy_price_collection.cpp
src/models/energy_price.h
src/utils/http_client.cpp
src/utils/time_utils.h
src/utils/time_utils.cpp
)
add_executable(${PROJECT_NAME} ${SOURCES})
# Add Google Test
enable_testing()
add_subdirectory(external/googletest)
include_directories(external/googletest/googletest/include)
# Add test executable
add_executable(EnergyPriceAppTests
tests/test_energy_price.cpp
)
target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS} curl nlohmann_json::nlohmann_json)
#target_link_libraries(${PROJECT_NAME} PRIVATE nlohmann_json::nlohmann_json)
#target_link_libraries(${PROJECT_NAME} nlohmann_json::nlohmann_json)
target_link_libraries(EnergyPriceAppTests gtest gtest_main nlohmann_json::nlohmann_json)
add_test(NAME EnergyPriceAppTests COMMAND EnergyPriceAppTests)