aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
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)