aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-07-15 17:03:35 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-07-15 17:03:35 +0200
commit6b92343222a2d788621c603d25855bd1a0c86252 (patch)
tree4f4765a6dd920b659917eadd1618e6b580c5b3de /CMakeLists.txt
downloadodr-edilib-6b92343222a2d788621c603d25855bd1a0c86252.tar.gz
odr-edilib-6b92343222a2d788621c603d25855bd1a0c86252.tar.bz2
odr-edilib-6b92343222a2d788621c603d25855bd1a0c86252.zip
Add project skeleton
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt73
1 files changed, 73 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..92c6ad3
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,73 @@
+########################################################################
+# Project setup
+########################################################################
+
+cmake_minimum_required(VERSION 2.8)
+project(edilib CXX)
+
+# Select the release build type by default to get optimization flags
+if(NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE "Debug")
+ message(STATUS "Build type not specified: defaulting to debug.")
+endif(NOT CMAKE_BUILD_TYPE)
+set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
+
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
+
+# Set the version information here
+set(VERSION_INFO_MAJOR_VERSION 0)
+set(VERSION_INFO_API_COMPAT 0)
+set(VERSION_INFO_MINOR_VERSION 0)
+set(VERSION_INFO_MAINT_VERSION git)
+
+
+########################################################################
+# Compiler specific setup
+########################################################################
+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -W -Wall -std=c++11")
+
+
+########################################################################
+# Find build dependencies
+########################################################################
+
+# libfec
+find_package(Fec REQUIRED)
+include_directories(${FEC_INCLUDE_DIRS})
+
+########################################################################
+# Setup apps
+########################################################################
+
+include_directories("./encoder")
+include_directories(".")
+
+list(APPEND edilib_sources
+ encoder/AFPacket.cpp
+ encoder/PFT.cpp
+ encoder/TagItems.cpp
+ encoder/TagPacket.cpp
+ ReedSolomon.cpp
+ test/main.cpp
+)
+
+set_source_files_properties(${edilib_sources} PROPERTIES LANGUAGE "CXX")
+add_executable(edilib ${edilib_sources})
+target_link_libraries(edilib ${FAAD_LIBRARIES} ${FEC_LIBRARIES})
+
+install(TARGETS edilib DESTINATION bin)
+
+
+########################################################################
+# Create uninstall target
+########################################################################
+
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+
+add_custom_target(uninstall
+ COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+