-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
24 lines (18 loc) · 858 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
project(StringTemplate)
cmake_minimum_required(VERSION 2.8)
add_definitions(-Wall)
include_directories(library)
file(GLOB_RECURSE library_headers library/*.hpp)
file(GLOB_RECURSE library_sources library/*.cpp)
add_library(stringtemplate ${library_sources} ${library_headers})
file(GLOB_RECURSE example_headers example/*.hpp)
file(GLOB_RECURSE example_sources example/*.cpp)
add_executable(example ${example_sources} ${example_headers})
target_link_libraries(example stringtemplate)
file(GLOB_RECURSE stpl_headers stpl/*.hpp)
file(GLOB_RECURSE stpl_sources stpl/*.cpp)
add_executable(stpl ${stpl_sources} ${stpl_headers})
target_link_libraries(stpl stringtemplate)
install(TARGETS stringtemplate DESTINATION /usr/local/lib)
install(TARGETS stpl DESTINATION /usr/local/bin)
install(FILES ${library_headers} DESTINATION /usr/local/include/StringTemplate)