CMakeLists.txt
author sl
Mon, 07 Jul 2014 21:32:47 +0200
changeset 2 d8186e7b69bf
child 8 5a9dbbc40c6b
permissions -rw-r--r--
Implementing and C API to control our MiniDisplay.
     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 FutabaVfd.cpp HidDevice.cpp MiniDisplay.cpp ../../GitHub/hidapi/windows/hid.c)
    14 source_group(Souces FILES ${SOURCES})
    15 
    16 set(INCLUDES BitArray.h FutabaVfd.h HidDevice.h HidReport.h MiniDisplay.h)
    17 source_group(Includes FILES ${INCLUDES})
    18 
    19 include_directories(../../GitHub/hidapi/hidapi)
    20 
    21 # Create a target for the library
    22 add_library(MiniDisplay ${LIB_TYPE} ${SOURCES} ${INCLUDES})
    23 
    24 target_link_libraries(MiniDisplay setupapi)