Deployment / CPack / Docker / Boost / Versionning
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
## limitations under the License.
|
||||
|
||||
cmake_minimum_required (VERSION 2.8.1)
|
||||
cmake_policy(SET CMP0042 NEW)
|
||||
cmake_policy(SET CMP0048 OLD)
|
||||
|
||||
project(cameradar CXX)
|
||||
|
||||
@@ -23,11 +23,15 @@ include(FindPkgConfig)
|
||||
pkg_search_module(GSTREAMER REQUIRED gstreamer-1.0)
|
||||
find_library(LIB_GSTREAMER NAMES ${GSTREAMER_LIBRARIES} HINTS ${GSTREAMER_LIBRARY_DIRS})
|
||||
|
||||
include_directories (${GSTREAMER_INCLUDE_DIRS})
|
||||
include_directories (
|
||||
${GSTREAMER_INCLUDE_DIRS}
|
||||
${PROJECT_SOURCE_DIR}/include
|
||||
${VERSION_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
link_directories (
|
||||
${GSTREAMER_LIBRARY_DIRS}
|
||||
"../../cctv_server2/deps/jsoncpp/src/deps.jsoncpp/src/lib_json"
|
||||
"../deps/jsoncpp/src/deps.jsoncpp/src/lib_json"
|
||||
)
|
||||
|
||||
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
|
||||
@@ -52,4 +56,5 @@ add_custom_command(TARGET cameradar PRE_BUILD
|
||||
${CMAKE_SOURCE_DIR}/cameradar_standalone/conf $<TARGET_FILE_DIR:cameradar>/conf/)
|
||||
|
||||
set (BINARIES_NAME ${PROJECT_BINARY_DIR}/cameradar)
|
||||
list (APPEND CCTV_BINARIES ${BINARIES_NAME})
|
||||
list (APPEND CAMERADAR_BINARIES ${BINARIES_NAME})
|
||||
set (CAMERADAR_BINARIES ${CAMERADAR_BINARIES} PARENT_SCOPE)
|
||||
|
||||
@@ -15,9 +15,18 @@
|
||||
#include <fs.h> // fs::home
|
||||
#include <opt_parse.h> // parsing opt
|
||||
#include <dispatcher.h> // program loop
|
||||
#include <iostream> // iostream
|
||||
#include "version.h" // versionning
|
||||
|
||||
namespace cmrdr = etix::cameradar;
|
||||
|
||||
void
|
||||
print_version() {
|
||||
std::cout << "Cameradar version " << CAMERADAR_VERSION << std::endl;
|
||||
std::cout << "Build " << CAMERADAR_VERSION_BUILD << std::endl;
|
||||
std::cout << "Git commit " << CAMERADAR_VERSION_GIT_SHA1 << std::endl;
|
||||
}
|
||||
|
||||
// Command line parsing
|
||||
std::pair<bool, etix::tool::opt_parse>
|
||||
parse_cmdline(int argc, char* argv[]) {
|
||||
@@ -37,7 +46,7 @@ parse_cmdline(int argc, char* argv[]) {
|
||||
opt_parse.print_help();
|
||||
return std::make_pair(false, opt_parse);
|
||||
} else if (opt_parse.exist("-v")) {
|
||||
std::cout << "Cameradar 0.1" << std::endl;
|
||||
print_version();
|
||||
return std::make_pair(false, opt_parse);
|
||||
} else if (opt_parse.has_error()) {
|
||||
std::cout << "Usage: ./cameradar [option]\n\toptions:\n" << std::endl;
|
||||
@@ -76,6 +85,7 @@ main(int argc, char* argv[]) {
|
||||
auto args = parse_cmdline(argc, argv);
|
||||
if (not args.first) return EXIT_FAILURE;
|
||||
|
||||
print_version();
|
||||
// configure file configuration path
|
||||
auto conf_path = std::string{};
|
||||
if (not args.second.exist("-c")) {
|
||||
|
||||
Reference in New Issue
Block a user