forked from Towerism/conan-example
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
34 lines (21 loc) · 764 Bytes
/
CMakeLists.txt
File metadata and controls
34 lines (21 loc) · 764 Bytes
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
cmake_minimum_required(VERSION 3.0.0)
project(MD5Encrypter)
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
add_definitions("-std=c++17")
add_definitions("-DWITH_GMOCK")
set(SRC_DIR "${PROJECT_SOURCE_DIR}/src")
set(TEST_DIR "${PROJECT_SOURCE_DIR}/test")
set(LIBRARIES_DIR libs)
set(LIBRARIES GenerateMD5)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()
add_executable(md5 ${SRC_DIR}/md5.cpp)
add_executable(md5_test ${TEST_DIR}/md5_test.cpp)
include_directories(SRC_DIR)
foreach(LIBRARY ${LIBRARIES})
add_subdirectory("${LIBRARIES_DIR}/${LIBRARY}")
endforeach(LIBRARY)
target_link_libraries(md5 ${LIBRARIES} ${CONAN_LIBS})
target_link_libraries(md5_test ${LIBRARIES} ${CONAN_LIBS})
add_test(NAME test COMMAND md5_test)
enable_testing()