Fix build error when building from a tarball instead of a git clone
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
project(WiVRn VERSION 1.0.0 LANGUAGES C CXX)
|
||||
project(WiVRn VERSION 0.7.1 LANGUAGES C CXX)
|
||||
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
|
||||
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
|
||||
execute_process(COMMAND git describe --always OUTPUT_VARIABLE GIT_DESC)
|
||||
string(STRIP ${GIT_DESC} GIT_DESC)
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags --always OUTPUT_VARIABLE GIT_DESC ERROR_QUIET)
|
||||
|
||||
if (GIT_DESC)
|
||||
string(STRIP ${GIT_DESC} GIT_DESC)
|
||||
else()
|
||||
set(GIT_DESC v${CMAKE_PROJECT_VERSION})
|
||||
endif()
|
||||
|
||||
configure_file(${INPUT_FILE} ${OUTPUT_FILE})
|
||||
|
||||
@@ -9,6 +9,7 @@ else ()
|
||||
-D GIT_EXECUTABLE=${GIT_EXECUTABLE}
|
||||
-D INPUT_FILE=${CMAKE_CURRENT_SOURCE_DIR}/version.cpp.in
|
||||
-D OUTPUT_FILE=${CMAKE_CURRENT_BINARY_DIR}/version.cpp
|
||||
-D CMAKE_PROJECT_VERSION=${CMAKE_PROJECT_VERSION}
|
||||
-P ${CMAKE_SOURCE_DIR}/cmake/GitVersion.cmake
|
||||
)
|
||||
endif()
|
||||
|
||||
+3
-1
@@ -22,6 +22,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "pidfd.h"
|
||||
#include "version.h"
|
||||
|
||||
#include "avahi_publisher.h"
|
||||
#include "hostname.h"
|
||||
@@ -106,7 +107,7 @@ int create_listen_socket()
|
||||
std::cerr << "Could not bind socket to path " << sock_file << ": " << strerror(errno) << ". Is the service running already?" << std::endl;
|
||||
if (errno == EADDRINUSE)
|
||||
{
|
||||
std::cerr << "If wivrn is not running, delete " << sock_file << " before starting a new instance" << std::endl;
|
||||
std::cerr << "If WiVRn is not running, delete " << sock_file << " before starting a new instance" << std::endl;
|
||||
}
|
||||
close(fd);
|
||||
throw std::system_error(errno, std::system_category());
|
||||
@@ -185,6 +186,7 @@ void waitpid_verbose(pid_t pid, const std::string& name)
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
std::cerr << "WiVRn " << git_version << " starting" << std::endl;
|
||||
create_listen_socket();
|
||||
|
||||
u_trace_marker_init();
|
||||
|
||||
Reference in New Issue
Block a user