13 lines
449 B
CMake
13 lines
449 B
CMake
|
cmake_minimum_required(VERSION 2.8)
|
||
|
project(software)
|
||
|
|
||
|
find_package(PkgConfig REQUIRED)
|
||
|
pkg_check_modules(LIBUSB REQUIRED libusb)
|
||
|
pkg_check_modules(GLIB2 REQUIRED glib-2.0)
|
||
|
INCLUDE_DIRECTORIES (${GLIB2_INCLUDE_DIRS})
|
||
|
LINK_DIRECTORIES (${GLIB2_LIBRARY_DIRS} ${LIBUSB_LIBRARY_DIRS})
|
||
|
add_definitions(${GLIB2_CFLAGS_OTHER} ${LIBUSB_CFLAGS_OTHER})
|
||
|
|
||
|
add_executable(${PROJECT_NAME} "main.c")
|
||
|
target_link_libraries(${PROJECT_NAME} ${GLIB2_LIBRARIES} -lusb)
|