aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-11-19 10:28:24 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-11-19 10:28:24 +0100
commita9a7fcc7c3baea55846109f67973046b6ef39881 (patch)
tree79086d2e9c5f71f6d193c352447cf5a331099912 /CMakeLists.txt
parent5ef0faf4b50df9ec99304732880a74c08f575e79 (diff)
downloadodr-edilib-a9a7fcc7c3baea55846109f67973046b6ef39881.tar.gz
odr-edilib-a9a7fcc7c3baea55846109f67973046b6ef39881.tar.bz2
odr-edilib-a9a7fcc7c3baea55846109f67973046b6ef39881.zip
Replace libfec dependency by copy of fec code
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt23
1 files changed, 13 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1eff757..caee500 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,7 @@
########################################################################
cmake_minimum_required(VERSION 2.8)
-project(edilib CXX)
+project(edilib CXX C)
# Select the release build type by default to get optimization flags
if(NOT CMAKE_BUILD_TYPE)
@@ -32,10 +32,6 @@ 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
########################################################################
@@ -43,18 +39,25 @@ include_directories(${FEC_INCLUDE_DIRS})
include_directories("./decoder")
include_directories(".")
-list(APPEND edilib_sources
+list(APPEND edilib_cpp_sources
ReedSolomon.cpp
- crc.c
decoder/EDIDecoder.cpp
decoder/ETIWriter.cpp
decoder/eti.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})
+list(APPEND edilib_c_sources
+ crc.c
+ fec/decode_rs_char.c
+ fec/encode_rs_char.c
+ fec/init_rs_char.c
+)
+
+set_source_files_properties(${edilib_cpp_sources} PROPERTIES LANGUAGE "CXX")
+set_source_files_properties(${edilib_c_sources} PROPERTIES LANGUAGE "C")
+add_executable(edilib ${edilib_cpp_sources} ${edilib_c_sources})
+target_link_libraries(edilib ${FAAD_LIBRARIES})
install(TARGETS edilib DESTINATION bin)