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 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 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)