CMakeLists.txt
author sl
Mon, 25 Aug 2014 22:05:30 +0200
changeset 11 2d749a2bea34
parent 1 dd5eef0de75a
child 12 62356e3ecb84
permissions -rw-r--r--
Now having only one generic request API.
That will help us support different display types.
     1 cmake_minimum_required(VERSION 2.8)
     2 
     3 project(MiniDisplay)
     4 # Allow the developer to select if Dynamic or Static libraries are built
     5 option (MD_SHARED_LIB "Build Shared Libraries" ON)
     6 # Set the LIB_TYPE variable to STATIC
     7 set (LIB_TYPE STATIC)
     8 if (MD_SHARED_LIB)
     9   # User wants to build Dynamic Libraries, so change the LIB_TYPE variable to CMake keyword 'SHARED'
    10   set (LIB_TYPE SHARED)
    11 endif (MD_SHARED_LIB)
    12 
    13 set(SOURCES		BitArray.cpp
    14 				FutabaVfd.cpp
    15 				FutabaGP1212.cpp
    16 				FutabaGP1212A01.cpp
    17 				FutabaGP1212A02.cpp
    18 				HidDevice.cpp
    19 				MiniDisplay.cpp
    20 				../../GitHub/hidapi/windows/hid.c)
    21 
    22 source_group(Souces FILES ${SOURCES})
    23 
    24 set(INCLUDES	BitArray.h
    25 				FutabaVfd.h
    26 				FutabaGP1212.h
    27 				FutabaGP1212A01.h
    28 				FutabaGP1212A02.h
    29 				HidDevice.h
    30 				HidReport.h
    31 				MiniDisplay.h)
    32 
    33 source_group(Includes FILES ${INCLUDES})
    34 
    35 include_directories(../../GitHub/hidapi/hidapi)
    36 
    37 # Create a target for the library
    38 add_library(MiniDisplay ${LIB_TYPE} ${SOURCES} ${INCLUDES})
    39 
    40 target_link_libraries(MiniDisplay setupapi)