added poco find files
This commit is contained in:
@@ -46,6 +46,8 @@ ENDIF(CROSS_COMPILE)
|
|||||||
cmake_minimum_required(VERSION 3.0.1)
|
cmake_minimum_required(VERSION 3.0.1)
|
||||||
project(FlippR-Driver VERSION 0.1.0)# LANGUAGES CXX)
|
project(FlippR-Driver VERSION 0.1.0)# LANGUAGES CXX)
|
||||||
|
|
||||||
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||||
|
|
||||||
#set easylogging flags
|
#set easylogging flags
|
||||||
add_definitions(-DELPP_NO_DEFAULT_LOG_FILE)
|
add_definitions(-DELPP_NO_DEFAULT_LOG_FILE)
|
||||||
|
|
||||||
|
|||||||
53
FlippR-Driver/cmake/PocoConfig.cmake.in
Normal file
53
FlippR-Driver/cmake/PocoConfig.cmake.in
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
if (CMAKE_VERSION VERSION_LESS 2.8.9)
|
||||||
|
message(FATAL_ERROR "Poco requires at least CMake version 2.8.9")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT Poco_FIND_COMPONENTS)
|
||||||
|
set(Poco_NOT_FOUND_MESSAGE "The Poco package requires at least one component")
|
||||||
|
set(Poco_FOUND False)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(_Poco_FIND_PARTS_REQUIRED)
|
||||||
|
if (Poco_FIND_REQUIRED)
|
||||||
|
set(_Poco_FIND_PARTS_REQUIRED REQUIRED)
|
||||||
|
endif()
|
||||||
|
set(_Poco_FIND_PARTS_QUIET)
|
||||||
|
if (Poco_FIND_QUIETLY)
|
||||||
|
set(_Poco_FIND_PARTS_QUIET QUIET)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
get_filename_component(_Poco_install_prefix "${CMAKE_CURRENT_LIST_DIR}" ABSOLUTE)
|
||||||
|
|
||||||
|
set(_Poco_NOTFOUND_MESSAGE)
|
||||||
|
|
||||||
|
# Let components find each other, but don't overwrite CMAKE_PREFIX_PATH
|
||||||
|
set(_Poco_CMAKE_PREFIX_PATH_old ${CMAKE_PREFIX_PATH})
|
||||||
|
set(CMAKE_PREFIX_PATH ${_Poco_install_prefix})
|
||||||
|
|
||||||
|
foreach(module ${Poco_FIND_COMPONENTS})
|
||||||
|
find_package(Poco${module}
|
||||||
|
${_Poco_FIND_PARTS_QUIET}
|
||||||
|
${_Poco_FIND_PARTS_REQUIRED}
|
||||||
|
PATHS "${_Poco_install_prefix}" NO_DEFAULT_PATH
|
||||||
|
)
|
||||||
|
if (NOT Poco${module}_FOUND)
|
||||||
|
if (Poco_FIND_REQUIRED_${module})
|
||||||
|
set(_Poco_NOTFOUND_MESSAGE "${_Poco_NOTFOUND_MESSAGE}Failed to find Poco component \"${module}\" config file at \"${_Poco_install_prefix}/Poco${module}/Poco${module}Config.cmake\"\n")
|
||||||
|
elseif(NOT Poco_FIND_QUIETLY)
|
||||||
|
message(WARNING "Failed to find Poco component \"${module}\" config file at \"${_Poco_install_prefix}/Poco${module}/Poco${module}Config.cmake\"")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# For backward compatibility set the LIBRARIES variable
|
||||||
|
list(APPEND Poco_LIBRARIES "Poco::${module}")
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
# Restore the original CMAKE_PREFIX_PATH value
|
||||||
|
set(CMAKE_PREFIX_PATH ${_Poco_CMAKE_PREFIX_PATH_old})
|
||||||
|
|
||||||
|
if (_Poco_NOTFOUND_MESSAGE)
|
||||||
|
set(Poco_NOT_FOUND_MESSAGE "${_Poco_NOTFOUND_MESSAGE}")
|
||||||
|
set(Poco_FOUND False)
|
||||||
|
endif()
|
||||||
|
|
||||||
11
FlippR-Driver/cmake/PocoConfigVersion.cmake.in
Normal file
11
FlippR-Driver/cmake/PocoConfigVersion.cmake.in
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
set(PACKAGE_VERSION @APPLICATION_VERSION@)
|
||||||
|
|
||||||
|
# Check whether the requested PACKAGE_FIND_VERSION is compatible
|
||||||
|
if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}")
|
||||||
|
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||||
|
else()
|
||||||
|
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||||
|
if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}")
|
||||||
|
set(PACKAGE_VERSION_EXACT TRUE)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
36
FlippR-Driver/cmake/README
Normal file
36
FlippR-Driver/cmake/README
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
CMAKE Files contributed by Andrew J. P. Maclean <a.maclean@optusnet.com.au>
|
||||||
|
|
||||||
|
|
||||||
|
Put the following files in the directory where your source code is:
|
||||||
|
CMakeLists.txt
|
||||||
|
PocoConfig.cmake.
|
||||||
|
|
||||||
|
Edit CMakeLists.txt to include your source and header files. The sections of interest are:
|
||||||
|
# Add any source files here.
|
||||||
|
SET( EXE_SRCS
|
||||||
|
"My File.cpp"
|
||||||
|
)
|
||||||
|
# Add any include files here.
|
||||||
|
SET( EXE_INCS
|
||||||
|
"My File.h"
|
||||||
|
)
|
||||||
|
|
||||||
|
Then create a subdirectory called build.
|
||||||
|
In Linux:
|
||||||
|
cd build
|
||||||
|
ccmake ..
|
||||||
|
or
|
||||||
|
ccmake -GKDevelop3 ..
|
||||||
|
(This will set up everything so you can use KDevelop3).
|
||||||
|
|
||||||
|
In Windows:
|
||||||
|
run CMakeSetup.exe and set the source code directory and where to build the libraries.
|
||||||
|
|
||||||
|
If CMake cannot find Poco, you will see that the variable Poco_INCLUDE_DIR has the value Poco_INCLUDE_DIR-NOTFOUND. Just set this value to the top level direcotry of where the Poco includes are.
|
||||||
|
|
||||||
|
If there is a different version of Poco, you may have to add edit the variables SUFFIX_FOR_INCLUDE_PATH, and SUFFIX_FOR_LIBRARY_PATH adding in the new Poco version in a similar manner to the existing ones in the file PocoConfig.cmake.
|
||||||
|
|
||||||
|
Finally:
|
||||||
|
In Linux
|
||||||
|
Either type "make" or if you are using KDevelop, click on the <ProjectName>.kdevelop file.
|
||||||
|
In Windows just use your IDE or nmake if you use nmake.
|
||||||
22
FlippR-Driver/cmake/cmake_uninstall.cmake.in
Normal file
22
FlippR-Driver/cmake/cmake_uninstall.cmake.in
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||||
|
MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
|
||||||
|
ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||||
|
|
||||||
|
FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
|
||||||
|
STRING(REGEX REPLACE "\n" ";" files "${files}")
|
||||||
|
FOREACH(file ${files})
|
||||||
|
MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
|
||||||
|
IF(EXISTS "$ENV{DESTDIR}${file}")
|
||||||
|
EXEC_PROGRAM(
|
||||||
|
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
|
||||||
|
OUTPUT_VARIABLE rm_out
|
||||||
|
RETURN_VALUE rm_retval
|
||||||
|
)
|
||||||
|
IF("${rm_retval}" STREQUAL 0)
|
||||||
|
ELSE("${rm_retval}" STREQUAL 0)
|
||||||
|
MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
|
||||||
|
ENDIF("${rm_retval}" STREQUAL 0)
|
||||||
|
ELSE(EXISTS "$ENV{DESTDIR}${file}")
|
||||||
|
MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
|
||||||
|
ENDIF(EXISTS "$ENV{DESTDIR}${file}")
|
||||||
|
ENDFOREACH(file)
|
||||||
9
FlippR-Driver/cmake/test_compiler.cpp
Normal file
9
FlippR-Driver/cmake/test_compiler.cpp
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#include <iostream>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
std::string str = "Try to compile";
|
||||||
|
std::cout << str << '\n';
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -2,17 +2,11 @@
|
|||||||
"deactivation_time_milliseconds" : 10,
|
"deactivation_time_milliseconds" : 10,
|
||||||
"port_extenders" :
|
"port_extenders" :
|
||||||
[
|
[
|
||||||
<<<<<<< HEAD
|
|
||||||
{
|
{
|
||||||
"name" : "extender_0",
|
"name" : "extender_0",
|
||||||
"i2c_address" : 33,
|
"i2c_address" : 33,
|
||||||
"pin_base" : 81
|
"pin_base" : 81
|
||||||
}
|
}
|
||||||
=======
|
|
||||||
"name" : "extender_0",
|
|
||||||
"i2c_address" : 33,
|
|
||||||
"pin_base" : 81
|
|
||||||
>>>>>>> aa1d6409ea18cff1ad4b0ef06804fcf5a521dee9
|
|
||||||
],
|
],
|
||||||
"fire_pin" :
|
"fire_pin" :
|
||||||
{
|
{
|
||||||
@@ -194,7 +188,162 @@
|
|||||||
"address" : "50",
|
"address" : "50",
|
||||||
"description" : "Speech 1: \"You're good! But I'm still the Champ!\"",
|
"description" : "Speech 1: \"You're good! But I'm still the Champ!\"",
|
||||||
"extender" : "extender_0"
|
"extender" : "extender_0"
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
"id" : 29,
|
||||||
|
"address" : "51",
|
||||||
|
"description" : "Speech 2: \"Twenty\"",
|
||||||
|
"extender" : "extender_0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 30,
|
||||||
|
"address" : "52",
|
||||||
|
"description" : "Speech 3: \"Seconds\"",
|
||||||
|
"extender" : "extender_0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 31,
|
||||||
|
"address" : "53",
|
||||||
|
"description" : "Speech 4: \"Five, Four, Three, Two, One.\"",
|
||||||
|
"extender" : "extender_0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 32,
|
||||||
|
"address" : "54",
|
||||||
|
"description" : "speech 1: \"you're good! but i'm still the champ!\"",
|
||||||
|
"extender" : "extender_0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 33,
|
||||||
|
"address" : "55",
|
||||||
|
"description" : "speech 1: \"you're good! but i'm still the champ!\"",
|
||||||
|
"extender" : "extender_0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 34,
|
||||||
|
"address" : "56",
|
||||||
|
"description" : "speech 1: \"you're good! but i'm still the champ!\"",
|
||||||
|
"extender" : "extender_0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 35,
|
||||||
|
"address" : "57",
|
||||||
|
"description" : "speech 1: \"you're good! but i'm still the champ!\"",
|
||||||
|
"extender" : "extender_0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 36,
|
||||||
|
"address" : "58",
|
||||||
|
"description" : "speech 1: \"you're good! but i'm still the champ!\"",
|
||||||
|
"extender" : "extender_0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 37,
|
||||||
|
"address" : "59",
|
||||||
|
"description" : "speech 1: \"you're good! but i'm still the champ!\"",
|
||||||
|
"extender" : "extender_0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 38,
|
||||||
|
"address" : "60",
|
||||||
|
"description" : "speech 1: \"you're good! but i'm still the champ!\"",
|
||||||
|
"extender" : "extender_0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 39,
|
||||||
|
"address" : "61",
|
||||||
|
"description" : "speech 1: \"you're good! but i'm still the champ!\"",
|
||||||
|
"extender" : "extender_0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 40,
|
||||||
|
"address" : "62",
|
||||||
|
"description" : "speech 1: \"you're good! but i'm still the champ!\"",
|
||||||
|
"extender" : "extender_0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 41,
|
||||||
|
"address" : "63",
|
||||||
|
"description" : "speech 1: \"you're good! but i'm still the champ!\"",
|
||||||
|
"extender" : "extender_0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 42,
|
||||||
|
"address" : "64",
|
||||||
|
"description" : "speech 1: \"you're good! but i'm still the champ!\"",
|
||||||
|
"extender" : "extender_0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 43,
|
||||||
|
"address" : "65",
|
||||||
|
"description" : "speech 1: \"you're good! but i'm still the champ!\"",
|
||||||
|
"extender" : "extender_0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 44,
|
||||||
|
"address" : "66",
|
||||||
|
"description" : "speech 1: \"you're good! but i'm still the champ!\"",
|
||||||
|
"extender" : "extender_0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 45,
|
||||||
|
"address" : "67",
|
||||||
|
"description" : "speech 1: \"you're good! but i'm still the champ!\"",
|
||||||
|
"extender" : "extender_0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 46,
|
||||||
|
"address" : "68",
|
||||||
|
"description" : "speech 1: \"you're good! but i'm still the champ!\"",
|
||||||
|
"extender" : "extender_0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 47,
|
||||||
|
"address" : "69",
|
||||||
|
"description" : "speech 1: \"you're good! but i'm still the champ!\"",
|
||||||
|
"extender" : "extender_0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 48,
|
||||||
|
"address" : "70",
|
||||||
|
"description" : "speech 1: \"you're good! but i'm still the champ!\"",
|
||||||
|
"extender" : "extender_0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 49,
|
||||||
|
"address" : "71",
|
||||||
|
"description" : "speech 1: \"you're good! but i'm still the champ!\"",
|
||||||
|
"extender" : "extender_0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 50,
|
||||||
|
"address" : "72",
|
||||||
|
"description" : "speech 1: \"you're good! but i'm still the champ!\"",
|
||||||
|
"extender" : "extender_0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 51,
|
||||||
|
"address" : "73",
|
||||||
|
"description" : "speech 1: \"you're good! but i'm still the champ!\"",
|
||||||
|
"extender" : "extender_0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 52,
|
||||||
|
"address" : "74",
|
||||||
|
"description" : "speech 1: \"you're good! but i'm still the champ!\"",
|
||||||
|
"extender" : "extender_0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 53,
|
||||||
|
"address" : "75",
|
||||||
|
"description" : "speech 1: \"you're good! but i'm still the champ!\"",
|
||||||
|
"extender" : "extender_0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id" : 54,
|
||||||
|
"address" : "76",
|
||||||
|
"description" : "speech 1: \"you're good! but i'm still the champ!\"",
|
||||||
|
"extender" : "extender_0"
|
||||||
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ namespace detail
|
|||||||
DriverBoardPinController::DriverBoardPinController(std::shared_ptr<std::mutex> output_item_mutex) :
|
DriverBoardPinController::DriverBoardPinController(std::shared_ptr<std::mutex> output_item_mutex) :
|
||||||
output_item_mutex(std::move(output_item_mutex))
|
output_item_mutex(std::move(output_item_mutex))
|
||||||
{
|
{
|
||||||
|
|
||||||
CLOG(INFO, OUTPUT_LOGGER) << "Created DriverBoardPinController.";
|
CLOG(INFO, OUTPUT_LOGGER) << "Created DriverBoardPinController.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user