sl@1
|
1 |
cmake_minimum_required(VERSION 2.8)
|
sl@1
|
2 |
|
sl@1
|
3 |
project(MiniDisplay)
|
sl@1
|
4 |
# Allow the developer to select if Dynamic or Static libraries are built
|
sl@1
|
5 |
option (MD_SHARED_LIB "Build Shared Libraries" ON)
|
sl@1
|
6 |
# Set the LIB_TYPE variable to STATIC
|
sl@1
|
7 |
set (LIB_TYPE STATIC)
|
sl@1
|
8 |
if (MD_SHARED_LIB)
|
sl@1
|
9 |
# User wants to build Dynamic Libraries, so change the LIB_TYPE variable to CMake keyword 'SHARED'
|
sl@1
|
10 |
set (LIB_TYPE SHARED)
|
sl@1
|
11 |
endif (MD_SHARED_LIB)
|
sl@1
|
12 |
|
sl@8
|
13 |
set(SOURCES BitArray.cpp
|
sl@8
|
14 |
FutabaVfd.cpp
|
sl@8
|
15 |
FutabaGP1212.cpp
|
sl@8
|
16 |
FutabaGP1212A01.cpp
|
sl@8
|
17 |
FutabaGP1212A02.cpp
|
sl@8
|
18 |
HidDevice.cpp
|
sl@8
|
19 |
MiniDisplay.cpp
|
sl@8
|
20 |
../../GitHub/hidapi/windows/hid.c)
|
sl@8
|
21 |
|
sl@1
|
22 |
source_group(Souces FILES ${SOURCES})
|
sl@1
|
23 |
|
sl@8
|
24 |
set(INCLUDES BitArray.h
|
sl@8
|
25 |
FutabaVfd.h
|
sl@8
|
26 |
FutabaGP1212.h
|
sl@8
|
27 |
FutabaGP1212A01.h
|
sl@8
|
28 |
FutabaGP1212A02.h
|
sl@8
|
29 |
HidDevice.h
|
sl@8
|
30 |
HidReport.h
|
sl@8
|
31 |
MiniDisplay.h)
|
sl@8
|
32 |
|
sl@1
|
33 |
source_group(Includes FILES ${INCLUDES})
|
sl@1
|
34 |
|
sl@1
|
35 |
include_directories(../../GitHub/hidapi/hidapi)
|
sl@1
|
36 |
|
sl@1
|
37 |
# Create a target for the library
|
sl@1
|
38 |
add_library(MiniDisplay ${LIB_TYPE} ${SOURCES} ${INCLUDES})
|
sl@1
|
39 |
|
sl@1
|
40 |
target_link_libraries(MiniDisplay setupapi) |