StephaneLenclud@35: # StephaneLenclud@35: # Copyright (C) 2014-2015 Stéphane Lenclud. StephaneLenclud@35: # StephaneLenclud@35: # This file is part of MiniDisplay. StephaneLenclud@35: # StephaneLenclud@35: # MiniDisplay is free software: you can redistribute it and/or modify StephaneLenclud@35: # it under the terms of the GNU General Public License as published by StephaneLenclud@35: # the Free Software Foundation, either version 3 of the License, or StephaneLenclud@35: # (at your option) any later version. StephaneLenclud@35: # StephaneLenclud@35: # MiniDisplay is distributed in the hope that it will be useful, StephaneLenclud@35: # but WITHOUT ANY WARRANTY; without even the implied warranty of StephaneLenclud@35: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the StephaneLenclud@35: # GNU General Public License for more details. StephaneLenclud@35: # StephaneLenclud@35: # You should have received a copy of the GNU General Public License StephaneLenclud@35: # along with MiniDisplay. If not, see . StephaneLenclud@35: # StephaneLenclud@35: sl@1: cmake_minimum_required(VERSION 2.8) sl@1: sl@1: project(MiniDisplay) sl@1: # Allow the developer to select if Dynamic or Static libraries are built sl@1: option (MD_SHARED_LIB "Build Shared Libraries" ON) sl@1: # Set the LIB_TYPE variable to STATIC sl@1: set (LIB_TYPE STATIC) sl@1: if (MD_SHARED_LIB) sl@1: # User wants to build Dynamic Libraries, so change the LIB_TYPE variable to CMake keyword 'SHARED' sl@1: set (LIB_TYPE SHARED) sl@1: endif (MD_SHARED_LIB) sl@1: sl@8: set(SOURCES BitArray.cpp sl@8: FutabaVfd.cpp sl@8: FutabaGP1212.cpp sl@8: FutabaGP1212A01.cpp sl@8: FutabaGP1212A02.cpp StephaneLenclud@25: FutabaMDM166AA.cpp sl@8: HidDevice.cpp sl@8: MiniDisplay.cpp sl@8: ../../GitHub/hidapi/windows/hid.c) sl@8: sl@1: source_group(Souces FILES ${SOURCES}) sl@1: sl@8: set(INCLUDES BitArray.h sl@8: FutabaVfd.h sl@8: FutabaGP1212.h sl@8: FutabaGP1212A01.h sl@8: FutabaGP1212A02.h StephaneLenclud@25: FutabaMDM166AA.h sl@8: HidDevice.h sl@8: HidReport.h sl@12: MiniDisplay.h sl@12: Display.h sl@12: ) sl@8: sl@1: source_group(Includes FILES ${INCLUDES}) sl@1: sl@1: include_directories(../../GitHub/hidapi/hidapi) sl@1: sl@1: # Create a target for the library sl@1: add_library(MiniDisplay ${LIB_TYPE} ${SOURCES} ${INCLUDES}) sl@1: sl@1: target_link_libraries(MiniDisplay setupapi)