Adding CMake file.
authorsl
Sun, 29 Jun 2014 20:38:15 +0200
changeset 1dd5eef0de75a
parent 0 0f874d9e4130
child 2 d8186e7b69bf
Adding CMake file.
CMakeLists.txt
MiniDisplay.cpp
MiniDisplay.h
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/CMakeLists.txt	Sun Jun 29 20:38:15 2014 +0200
     1.3 @@ -0,0 +1,24 @@
     1.4 +cmake_minimum_required(VERSION 2.8)
     1.5 +
     1.6 +project(MiniDisplay)
     1.7 +# Allow the developer to select if Dynamic or Static libraries are built
     1.8 +option (MD_SHARED_LIB "Build Shared Libraries" ON)
     1.9 +# Set the LIB_TYPE variable to STATIC
    1.10 +set (LIB_TYPE STATIC)
    1.11 +if (MD_SHARED_LIB)
    1.12 +  # User wants to build Dynamic Libraries, so change the LIB_TYPE variable to CMake keyword 'SHARED'
    1.13 +  set (LIB_TYPE SHARED)
    1.14 +endif (MD_SHARED_LIB)
    1.15 +
    1.16 +set(SOURCES BitArray.cpp FutabaVfd.cpp HidDevice.cpp MiniDisplay.cpp ../../GitHub/hidapi/windows/hid.c)
    1.17 +source_group(Souces FILES ${SOURCES})
    1.18 +
    1.19 +set(INCLUDES BitArray.h FutabaVfd.h HidDevice.h HidReport.h MiniDisplay.h)
    1.20 +source_group(Includes FILES ${INCLUDES})
    1.21 +
    1.22 +include_directories(../../GitHub/hidapi/hidapi)
    1.23 +
    1.24 +# Create a target for the library
    1.25 +add_library(MiniDisplay ${LIB_TYPE} ${SOURCES} ${INCLUDES})
    1.26 +
    1.27 +target_link_libraries(MiniDisplay setupapi)
    1.28 \ No newline at end of file
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/MiniDisplay.h	Sun Jun 29 20:38:15 2014 +0200
     2.3 @@ -0,0 +1,28 @@
     2.4 +//
     2.5 +//
     2.6 +//
     2.7 +
     2.8 +#ifndef MINI_DISPLAY_H
     2.9 +#define MINI_DISPLAY_H
    2.10 +
    2.11 +/**
    2.12 +*/
    2.13 +class IMiniDisplay
    2.14 +	{
    2.15 +public:
    2.16 +	
    2.17 +	};
    2.18 +
    2.19 +
    2.20 +/**
    2.21 +*/
    2.22 +class MiniDisplay
    2.23 +	{
    2.24 +	static IMiniDisplay* Create();
    2.25 +
    2.26 +	};
    2.27 +
    2.28 +
    2.29 +
    2.30 +#endif
    2.31 +