-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
32 lines (26 loc) · 1019 Bytes
/
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
cmake_minimum_required(VERSION 3.10)
project(markdown_to_polygon_statement)
set(PROGRAM "md2pst")
set(PROGRAM_HEADERS
src/polygon.hpp
)
set(PROGRAM_SOURCES
src/main.cpp
src/polygon.cpp
${PROGRAM_HEADERS}
)
configure_file(CMakeLists.cmark-gfm.txt cmark-gfm/CMakeLists.txt)
execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cmark-gfm
)
execute_process(COMMAND ${CMAKE_COMMAND} --build .
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cmark-gfm
)
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "${CMAKE_BINARY_DIR}/cmark-gfm/install" CACHE PATH "DESC" FORCE)
include_directories(${CMAKE_SOURCE_DIR}/cmark-gfm/src)
include_directories(${CMAKE_SOURCE_DIR}/cmark-gfm/build/src)
include_directories(${CMAKE_SOURCE_DIR}/cmark-gfm/extensions)
include_directories(${CMAKE_SOURCE_DIR}/install/include)
link_directories(${CMAKE_SOURCE_DIR}/install/lib)
add_executable(${PROGRAM} ${PROGRAM_SOURCES})
target_link_libraries(${PROGRAM} cmark-gfm)