-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
22 lines (16 loc) · 774 Bytes
/
Copy pathCMakeLists.txt
File metadata and controls
22 lines (16 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
cmake_minimum_required(VERSION 3.5)
project(dmx512usb)
if (NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/d2xx/release/ftd2xx.h)
message(FATAL_ERROR "FTDI d2xx library not found. See README.md for instructions")
endif()
add_library(d2xx STATIC IMPORTED)
set_target_properties(d2xx PROPERTIES
IMPORTED_LOCATION "${CMAKE_CURRENT_LIST_DIR}/d2xx/release/build/libftd2xx.a"
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_LIST_DIR}/d2xx/release"
)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
add_executable(example src/example.cpp src/dmx512usb.cpp src/dmx512usb.h)
target_compile_options(example PRIVATE -Wall -Wextra -Wpedantic -Werror)
target_link_libraries(example PUBLIC d2xx "-framework CoreFoundation" "-framework IOKit")