CMakeLists.txt
author StephaneLenclud
Sat, 26 Sep 2015 11:45:26 +0200
changeset 39 c32f4955c166
parent 25 3fa4007c0b19
permissions -rw-r--r--
More fixes to our NuGet package targets file.
StephaneLenclud@35
     1
#
StephaneLenclud@35
     2
# Copyright (C) 2014-2015 Stéphane Lenclud.
StephaneLenclud@35
     3
#
StephaneLenclud@35
     4
# This file is part of MiniDisplay.
StephaneLenclud@35
     5
#
StephaneLenclud@35
     6
# MiniDisplay is free software: you can redistribute it and/or modify
StephaneLenclud@35
     7
# it under the terms of the GNU General Public License as published by
StephaneLenclud@35
     8
# the Free Software Foundation, either version 3 of the License, or
StephaneLenclud@35
     9
# (at your option) any later version.
StephaneLenclud@35
    10
#
StephaneLenclud@35
    11
# MiniDisplay is distributed in the hope that it will be useful,
StephaneLenclud@35
    12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
StephaneLenclud@35
    13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
StephaneLenclud@35
    14
# GNU General Public License for more details.
StephaneLenclud@35
    15
#
StephaneLenclud@35
    16
# You should have received a copy of the GNU General Public License
StephaneLenclud@35
    17
# along with MiniDisplay.  If not, see <http:#www.gnu.org/licenses/>.
StephaneLenclud@35
    18
#
StephaneLenclud@35
    19
sl@1
    20
cmake_minimum_required(VERSION 2.8)
sl@1
    21
sl@1
    22
project(MiniDisplay)
sl@1
    23
# Allow the developer to select if Dynamic or Static libraries are built
sl@1
    24
option (MD_SHARED_LIB "Build Shared Libraries" ON)
sl@1
    25
# Set the LIB_TYPE variable to STATIC
sl@1
    26
set (LIB_TYPE STATIC)
sl@1
    27
if (MD_SHARED_LIB)
sl@1
    28
  # User wants to build Dynamic Libraries, so change the LIB_TYPE variable to CMake keyword 'SHARED'
sl@1
    29
  set (LIB_TYPE SHARED)
sl@1
    30
endif (MD_SHARED_LIB)
sl@1
    31
sl@8
    32
set(SOURCES		BitArray.cpp
sl@8
    33
				FutabaVfd.cpp
sl@8
    34
				FutabaGP1212.cpp
sl@8
    35
				FutabaGP1212A01.cpp
sl@8
    36
				FutabaGP1212A02.cpp
StephaneLenclud@25
    37
				FutabaMDM166AA.cpp
sl@8
    38
				HidDevice.cpp
sl@8
    39
				MiniDisplay.cpp
sl@8
    40
				../../GitHub/hidapi/windows/hid.c)
sl@8
    41
sl@1
    42
source_group(Souces FILES ${SOURCES})
sl@1
    43
sl@8
    44
set(INCLUDES	BitArray.h
sl@8
    45
				FutabaVfd.h
sl@8
    46
				FutabaGP1212.h
sl@8
    47
				FutabaGP1212A01.h
sl@8
    48
				FutabaGP1212A02.h
StephaneLenclud@25
    49
				FutabaMDM166AA.h
sl@8
    50
				HidDevice.h
sl@8
    51
				HidReport.h
sl@12
    52
				MiniDisplay.h
sl@12
    53
				Display.h
sl@12
    54
				)
sl@8
    55
sl@1
    56
source_group(Includes FILES ${INCLUDES})
sl@1
    57
sl@1
    58
include_directories(../../GitHub/hidapi/hidapi)
sl@1
    59
sl@1
    60
# Create a target for the library
sl@1
    61
add_library(MiniDisplay ${LIB_TYPE} ${SOURCES} ${INCLUDES})
sl@1
    62
sl@1
    63
target_link_libraries(MiniDisplay setupapi)