summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: 56e8ff8073639bad3dd4939b5ab874c4d9a3e608 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
cmake_minimum_required(VERSION 3.5)

project(html_parser LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

add_executable(html_parser src/main.cpp src/html_token.cpp src/tokenizer.cpp)

if(MSVC)
  target_compile_options(html_parser PRIVATE /W4 /WX)
else()
  target_compile_options(html_parser PRIVATE -Wall -Wextra -Wpedantic -Wswitch-enum)
endif()

target_link_libraries(html_parser -lmatte)

install(TARGETS html_parser
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})