forked from cdyk/rvmparser
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
35 lines (30 loc) · 1.18 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
cmake_minimum_required(VERSION 2.6)
SET(CMAKE_C_COMPILER "clang")
SET(CMAKE_CXX_COMPILER "clang++")
project(rvmparser)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
message("CMAKE_LIBRARY_OUTPUT_DIRECTORY: " ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
include_directories(
"${CMAKE_SOURCE_DIR}/src"
"${CMAKE_SOURCE_DIR}/libs/libtess2/Include"
"${CMAKE_SOURCE_DIR}/libs/libtess2/Source"
"${CMAKE_SOURCE_DIR}/libs/rapidjson/include"
"${CMAKE_SOURCE_DIR}/libs/cork/include"
)
link_directories(
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
"${CMAKE_SOURCE_DIR}/libs/cork/lib"
)
file(GLOB SOURCES
"${CMAKE_SOURCE_DIR}/src/*.cpp"
"${CMAKE_SOURCE_DIR}/libs/libtess2/Source/*.c"
)
list(REMOVE_ITEM SOURCES
"${CMAKE_SOURCE_DIR}/src/main.cpp"
"${CMAKE_SOURCE_DIR}/src/ExportJson.cpp"
)
add_library (${PROJECT_NAME} STATIC ${SOURCES})
add_executable(${PROJECT_NAME}test "${CMAKE_SOURCE_DIR}/src/main.cpp")
target_link_libraries(${PROJECT_NAME}test -l${PROJECT_NAME} -static -static-libgcc -static-libstdc++ -lpthread -lcork -lmpir)