-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
executable file
·34 lines (31 loc) · 1.31 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
cmake_minimum_required (VERSION 2.6)
project (midi-to-hex)
set(CMAKE_C_FLAGS "-Os -std=c99")
set(CMAKE_CXX_FLAGS "-Os -std=c++14")
if(WIN32)
ADD_DEFINITIONS(-D WIN)
LINK_DIRECTORIES(./libusb/MinGW64/static/)
endif()
if(APPLE)
INCLUDE_DIRECTORIES(/usr/local/Cellar/libusb/1.0.20/include)
ADD_DEFINITIONS(-D MAC_OS)
endif()
if(UNIX AND NOT APPLE)
ADD_DEFINITIONS(-D LINUX)
endif()
add_subdirectory(fmt EXCLUDE_FROM_ALL)
aux_source_directory(./midifile/src DIR_MIDI_LIB_SRCS)
aux_source_directory(./Intel-HEX-Class/intelhex_class DIR_HEX_LIB_SRCS)
aux_source_directory(./micronucleus_tool DIR_MICRONUCLEUS_SRCS)
aux_source_directory(./micronucleus_tool/library DIR_MICRONUCLEUS_LIB_SRCS)
aux_source_directory(./bprinter/src DIR_BPRINTER_LIB_SRCS)
INCLUDE_DIRECTORIES(./midifile/include)
INCLUDE_DIRECTORIES(./libusb/include/libusb-1.0)
INCLUDE_DIRECTORIES(./Intel-HEX-Class/intelhex_class)
INCLUDE_DIRECTORIES(./micronucleus_tool/library)
INCLUDE_DIRECTORIES(./micronucleus_tool)
INCLUDE_DIRECTORIES(./bprinter/include)
INCLUDE_DIRECTORIES(./fmt/include)
# add the executable
add_executable(midi-to-hex midi-to-hex.cpp NoteListProcessor.cpp ByteStream.cpp ./fmt/src/format.cc ${DIR_MIDI_LIB_SRCS} ${DIR_HEX_LIB_SRCS} ${DIR_MICRONUCLEUS_SRCS} ${DIR_BPRINTER_LIB_SRCS} ${DIR_MICRONUCLEUS_LIB_SRCS})
target_link_libraries(midi-to-hex -lusb-1.0)