-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
42 lines (30 loc) · 1.53 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
36
37
38
39
40
41
42
cmake_minimum_required(VERSION 2.8)
project(kondo)
set(CMAKE_BUILD_TYPE Release)
SET(CMAKE_CXX_FLAGS "-pthread -std=c++11")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
message(STATUS "CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH}")
find_package(FTDI REQUIRED)
find_package(LIBUSB REQUIRED)
file(GLOB HEADERS "include/*.h")
file(GLOB SOURCES "src/*.cpp")
include_directories(include ${FTDI_INCLUDE_DIR}) #${LIBUSB_INCLUDE_DIRS})
add_library(kondo SHARED ${SOURCES})
target_link_libraries(kondo ${FTDI_LIBRARY}) #${LIBUSB_LIBRARIES})
#add_subdirectory(python)
add_executable(test_kondo_move utils/test_kondo_move.cpp ${SOURCES})
target_link_libraries(test_kondo_move ${FTDI_LIBRARY}) #${LIBUSB_LIBRARIES})
add_executable(test_kondo_set_angle utils/test_kondo_set_angle.cpp ${SOURCES})
target_link_libraries(test_kondo_set_angle ${FTDI_LIBRARY}) #${LIBUSB_LIBRARIES})
add_executable(test_kondo_set_angles utils/test_kondo_set_angles.cpp ${SOURCES})
target_link_libraries(test_kondo_set_angles ${FTDI_LIBRARY}) #${LIBUSB_LIBRARIES})
#add_executable(test_ics utils/test_ics.cpp ${SOURCES})
#target_link_libraries(test_ics m ${FTDI_LIBRARY}) #${LIBUSB_LIBRARIES})
#
#add_executable(test_digital utils/test_digital.cpp ${SOURCES})
#target_link_libraries(test_digital ${FTDI_LIBRARY}) #${LIBUSB_LIBRARIES})
#
#add_executable(test_analog utils/test_analog.cpp ${SOURCES})
#target_link_libraries(test_analog ${FTDI_LIBRARY}) #${LIBUSB_LIBRARIES})