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