-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
43 lines (32 loc) · 1.03 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
36
37
38
39
40
41
42
43
cmake_minimum_required(VERSION 2.6)
##project
project(openfec C)
ENABLE_TESTING()
if (PROFILING STREQUAL "ON")
else(PROFILING STREQUAL "ON")
endif(PROFILING STREQUAL "ON")
if (DEBUG STREQUAL "ON")
# Debug mode
ADD_DEFINITIONS(-DOF_DEBUG)
set(CMAKE_BUILD_TYPE Debug)
message(STATUS "Debug mode ON" )
else(DEBUG STREQUAL "ON")
# Release mode
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_C_FLAGS "-O4")
message(STATUS "Debug mode OFF")
endif (DEBUG STREQUAL "ON")
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin/${CMAKE_BUILD_TYPE})
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin/${CMAKE_BUILD_TYPE})
MARK_AS_ADVANCED(
LIBRARY_OUTPUT_PATH
EXECUTABLE_OUTPUT_PATH
)
link_directories(${LIBRARY_OUTPUT_PATH})
add_subdirectory(src)
add_subdirectory(applis/eperftool)
add_subdirectory(applis/howto_examples/simple_client_server)
add_subdirectory(tools/descr_stats_v1.2)
add_subdirectory(tests)
install(DIRECTORY src/ DESTINATION include/openfec FILES_MATCHING PATTERN "*.h")
install(FILES bin/Release/libopenfec.so DESTINATION lib)