-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
38 lines (27 loc) · 1.26 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
# Set the minimum requirement for building this project
cmake_minimum_required(VERSION 3.22.1)
# Set your desired C++ standard
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Set Project Name
project(OFDM)
# Append the -g flag to the compiler options
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
# Add the library we want to build
# add_library(ofdm SHARED constellation.cpp ofdm.cpp)
# Use a wildcard pattern to include all .cpp files in the src directory
file(GLOB SOURCES "src/*.cpp")
list(APPEND SOURCES "src/ErrorCorrection/hammingCode.cpp")
# Include directories
include_directories(/Applications/MATLAB_R2022b.app/extern/include)
include_directories(${CMAKE_SOURCE_DIR}/include/*)
# Add the executable that we want to build
add_executable(ofdm ${SOURCES})
# Specify that we need to link against our created library
target_link_libraries(ofdm PRIVATE ${CMAKE_SOURCE_DIR}/lib/libfftw3.dylib)
target_link_libraries(ofdm PRIVATE /Applications/MATLAB_R2022b.app/bin/maci64/libmat.dylib)
target_link_libraries(ofdm PRIVATE /Applications/MATLAB_R2022b.app/bin/maci64/libmx.dylib)
# target_link_libraries(main PRIVATE ofdm)