-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
48 lines (41 loc) · 1.15 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.27)
project(sri)
# CPP 17
set(CMAKE_CXX_STANDARD 17)
# My code to build
add_executable(
sri src/main.cpp
src/SRI.cpp
lib/htmlcxx-0.86/html/ParserDom.cc
lib/htmlcxx-0.86/html/Node.cc
lib/htmlcxx-0.86/html/ParserSax.cc
src/HTMLFile.h
src/HTMLFile.cpp
)
# Link the static version of the Crypto++ library
# set(CMAKE_EXE_LINKER_FLAGS "-static")
# Dependency with Cryptopp 8 installed with
# sudo apt-get install libcrypto++8 libcrypto++-dev
target_link_libraries(sri cryptopp)
# Find the CURL library
find_package(CURL REQUIRED)
# Link the CURL library
target_link_libraries(${PROJECT_NAME} CURL::libcurl)
# Test SRI class
add_executable(
sri-test tests/SRI.cpp
src/SRI.cpp
)
target_link_libraries(sri-test cryptopp)
# Test HTMLFile class
add_executable(
html-test tests/HTMLFile.cpp
src/SRI.cpp
lib/htmlcxx-0.86/html/ParserDom.cc
lib/htmlcxx-0.86/html/Node.cc
lib/htmlcxx-0.86/html/ParserSax.cc
src/HTMLFile.h
src/HTMLFile.cpp
)
target_link_libraries(html-test cryptopp)
target_link_libraries(html-test CURL::libcurl)