-
Notifications
You must be signed in to change notification settings - Fork 7
/
CMakeLists.txt
executable file
·28 lines (25 loc) · 1.03 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
cmake_minimum_required (VERSION 2.6)
# add /opt/local to cmake search prefix to find MacPorts-installed libs on OSX
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} /opt/local)
find_path(LO_INCLUDE_DIR lo/lo.h)
find_library(LO_LIBRARY lo)
include_directories(${LO_INCLUDE_DIR})
IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
FIND_LIBRARY(IOKIT_LIB IOKit)
FIND_LIBRARY(COREFOUND_LIB CoreFoundation)
SET(SYSTEM_LIBS ${IOKIT_LIB} ${COREFOUND_LIB})
SET(HIDAPI_SRC "../core/extern/hidapi/mac/hid.c")
ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
SET(HIDAPI_SRC "../core/extern/hidapi/linux/hid.c")
SET(SYSTEM_LIBS udev)
ELSE()
SET(HIDAPI_SRC "../core/extern/hidapi/windows/hid.c")
SET(SYSTEM_LIBS setupapi)
ENDIF()
INCLUDE_DIRECTORIES("../core/extern/hidapi/hidapi")
INSTALL(PROGRAMS build/MantaOSC DESTINATION bin)
add_executable(MantaOSC MantaOSC.cpp
../core/Manta.cpp
../core/MantaUSB.cpp
${HIDAPI_SRC})
target_link_libraries(MantaOSC ${LO_LIBRARY} ${SYSTEM_LIBS} m)