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@1: set(SOURCES BitArray.cpp FutabaVfd.cpp HidDevice.cpp MiniDisplay.cpp ../../GitHub/hidapi/windows/hid.c) sl@1: source_group(Souces FILES ${SOURCES}) sl@1: sl@1: set(INCLUDES BitArray.h FutabaVfd.h HidDevice.h HidReport.h MiniDisplay.h) 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)