mirror of
https://github.com/vale981/openAV-Luppp
synced 2025-03-04 16:51:37 -05:00
-Updated CMake, version auto-generated. Fixes #69
This commit is contained in:
parent
abff10a08e
commit
738da63d9f
4 changed files with 15 additions and 11 deletions
|
@ -3,9 +3,11 @@ cmake_minimum_required (VERSION 2.6)
|
||||||
|
|
||||||
project (LUPPP)
|
project (LUPPP)
|
||||||
|
|
||||||
set (LUPPP_VERSION_MAJOR 1)
|
set(LUPPP_VERSION_MAJOR "1")
|
||||||
set (LUPPP_VERSION_MINOR 0)
|
set(LUPPP_VERSION_MINOR "0")
|
||||||
|
set(LUPPP_VERSION_PATCH "1")
|
||||||
|
|
||||||
|
set(LUPPP_VERSION "${LUPPP_VERSION_MAJOR}.${LUPPP_VERSION_MINOR}.${LUPPP_VERSION_PATCH}")
|
||||||
|
|
||||||
option(BUILD_TESTS "Build test version" OFF)
|
option(BUILD_TESTS "Build test version" OFF)
|
||||||
|
|
||||||
|
@ -17,4 +19,13 @@ option(BUILD_TESTS "Build test version" OFF)
|
||||||
#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||||
#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||||
|
|
||||||
|
#execute_process(COMMAND "date +\"%d-%m-%Y\"` `git log --pretty=format:\"%h\" | head -n1`"
|
||||||
|
|
||||||
|
#execute_process(COMMAND "git log --pretty=format:\"%h\" | head -n1"
|
||||||
|
|
||||||
|
execute_process(COMMAND git log --oneline -n1
|
||||||
|
OUTPUT_VARIABLE _output OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
file(WRITE src/version.hxx "#define GIT_VERSION \"${_output}\"")
|
||||||
|
|
||||||
|
|
||||||
add_subdirectory (src)
|
add_subdirectory (src)
|
||||||
|
|
|
@ -46,7 +46,7 @@ ENDIF(RELEASE_BUILD)
|
||||||
FILE(GLOB sources *.cxx avtk/*.cxx cjson/*.c controller/*.cxx dsp/*.cxx observer/*.cxx state/*.cxx tests/*.cxx)
|
FILE(GLOB sources *.cxx avtk/*.cxx cjson/*.c controller/*.cxx dsp/*.cxx observer/*.cxx state/*.cxx tests/*.cxx)
|
||||||
|
|
||||||
# Compile binary
|
# Compile binary
|
||||||
add_executable (luppp ${sources} )
|
add_executable (luppp version.hxx ${sources} )
|
||||||
|
|
||||||
|
|
||||||
# Linking
|
# Linking
|
||||||
|
|
|
@ -58,7 +58,7 @@ static void gui_static_loadSession_cb(void* inst)
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
LUPPP_NOTE("%s", GIT_VERSION );
|
LUPPP_NOTE("Git: %s", GIT_VERSION );
|
||||||
|
|
||||||
bool runTests;
|
bool runTests;
|
||||||
if ( runTests ){} // remove unused warning if not built with BUILD_TESTS
|
if ( runTests ){} // remove unused warning if not built with BUILD_TESTS
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# this file writes src/version.h from the git commit
|
|
||||||
echo "
|
|
||||||
#ifndef GIT_VERSION
|
|
||||||
#define GIT_VERSION \"`date +\"%d-%m-%Y\"` `git log --pretty=format:"%h" | head -n1`\"
|
|
||||||
#endif" > src/version.hxx
|
|
Loading…
Add table
Reference in a new issue