-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
25 lines (20 loc) · 925 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
cmake_minimum_required(VERSION 3.5)
project( ParseTree VERSION 0.1.0 )
add_library(ParseTree STATIC src/ParseTree.c)
target_include_directories( ParseTree PUBLIC ${PROJECT_SOURCE_DIR}/include )
target_sources( ParseTree PRIVATE ${PROJECT_SOURCE_DIR}/src/ParseTree )
target_sources( ParseTree PUBLIC ${PROJECT_SOURCE_DIR}/include/ParseTree )
set_target_properties(ParseTree
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/lib"
LIBRARY_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/lib"
RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin"
)
if(NOT TARGET LinkedList)
add_subdirectory(${CMAKE_SOURCE_DIR}/ext/LinkedList ${CMAKE_SOURCE_DIR}/ext/LinkedList/build/bin)
endif(NOT TARGET LinkedList)
target_link_libraries(ParseTree LinkedList)
if(NOT TARGET Token)
add_subdirectory(${CMAKE_SOURCE_DIR}/ext/Token ${CMAKE_SOURCE_DIR}/ext/Token/build/bin)
endif(NOT TARGET Token)
target_link_libraries(ParseTree Token)