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.
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@1
    13
set(SOURCES BitArray.cpp FutabaVfd.cpp HidDevice.cpp MiniDisplay.cpp ../../GitHub/hidapi/windows/hid.c)
sl@1
    14
source_group(Souces FILES ${SOURCES})
sl@1
    15
sl@1
    16
set(INCLUDES BitArray.h FutabaVfd.h HidDevice.h HidReport.h MiniDisplay.h)
sl@1
    17
source_group(Includes FILES ${INCLUDES})
sl@1
    18
sl@1
    19
include_directories(../../GitHub/hidapi/hidapi)
sl@1
    20
sl@1
    21
# Create a target for the library
sl@1
    22
add_library(MiniDisplay ${LIB_TYPE} ${SOURCES} ${INCLUDES})
sl@1
    23
sl@1
    24
target_link_libraries(MiniDisplay setupapi)