Move config values from the commandline to obsconfig.h
This commit is contained in:
parent
94e2badb0e
commit
cac6ad1822
@ -42,7 +42,9 @@ if(NOT UNIX_STRUCTURE)
|
||||
set(OBS_PLUGIN_DESTINATION "obs-plugins")
|
||||
set(OBS_PLUGIN32_DESTINATION "obs-plugins")
|
||||
set(OBS_PLUGIN64_DESTINATION "obs-plugins")
|
||||
add_definitions(-DOBS_DATA_PATH="../${OBS_DATA_DESTINATION}")
|
||||
|
||||
set(OBS_DATA_PATH "../${OBS_DATA_DESTINATION}")
|
||||
set(OBS_INSTALL_PREFIX "")
|
||||
else()
|
||||
set(OBS_EXECUTABLE_DESTINATION "bin/${_lib_suffix}bit")
|
||||
set(OBS_EXECUTABLE32_DESTINATION "bin/32bit")
|
||||
@ -53,7 +55,9 @@ if(NOT UNIX_STRUCTURE)
|
||||
set(OBS_PLUGIN_DESTINATION "obs-plugins/${_lib_suffix}bit")
|
||||
set(OBS_PLUGIN32_DESTINATION "obs-plugins/32bit")
|
||||
set(OBS_PLUGIN64_DESTINATION "obs-plugins/64bit")
|
||||
add_definitions(-DOBS_DATA_PATH="../../${OBS_DATA_DESTINATION}")
|
||||
|
||||
set(OBS_DATA_PATH "../../${OBS_DATA_DESTINATION}")
|
||||
set(OBS_INSTALL_PREFIX "")
|
||||
endif()
|
||||
set(OBS_CMAKE_DESTINATION "cmake")
|
||||
set(OBS_INCLUDE_DESTINATION "include")
|
||||
@ -70,8 +74,9 @@ else()
|
||||
set(OBS_DATA_DESTINATION "share/obs")
|
||||
set(OBS_CMAKE_DESTINATION "lib/cmake")
|
||||
set(OBS_INCLUDE_DESTINATION "include/obs")
|
||||
add_definitions(-DOBS_DATA_PATH="${OBS_DATA_DESTINATION}")
|
||||
add_definitions(-DOBS_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}/")
|
||||
|
||||
set(OBS_DATA_PATH "${OBS_DATA_DESTINATION}")
|
||||
set(OBS_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/")
|
||||
endif()
|
||||
|
||||
function(obs_finish_bundle)
|
||||
|
@ -56,7 +56,9 @@
|
||||
#ifdef HAVE_OBSCONFIG_H
|
||||
# include "obsconfig.h"
|
||||
#else
|
||||
|
||||
#define OBS_VERSION "unknown"
|
||||
|
||||
# define OBS_VERSION "unknown"
|
||||
# define OBS_DATA_PATH "../../data"
|
||||
# define OBS_INSTALL_PREFIX ""
|
||||
#endif
|
||||
|
||||
#define OBS_INSTALL_DATA_PATH OBS_INSTALL_PREFIX OBS_DATA_PATH
|
||||
|
@ -2,4 +2,5 @@
|
||||
#pragma once
|
||||
|
||||
#define OBS_VERSION "@OBS_VERSION@"
|
||||
|
||||
#define OBS_DATA_PATH "@OBS_DATA_PATH@"
|
||||
#define OBS_INSTALL_PREFIX "@OBS_INSTALL_PREFIX@"
|
||||
|
@ -76,13 +76,3 @@ typedef int64_t off64_t;
|
||||
#define SIZE_T_FORMAT "%zu"
|
||||
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
#ifndef OBS_DATA_PATH
|
||||
#define OBS_DATA_PATH "../../data"
|
||||
#endif
|
||||
|
||||
#ifndef OBS_INSTALL_PREFIX
|
||||
#define OBS_INSTALL_PREFIX ""
|
||||
#endif
|
||||
|
||||
#define OBS_INSTALL_DATA_PATH OBS_INSTALL_PREFIX OBS_DATA_PATH
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
#include <sstream>
|
||||
#include <util/base.h>
|
||||
#include <obs-config.h>
|
||||
#include "platform.hpp"
|
||||
#include "obs-app.hpp"
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <sstream>
|
||||
#include "obs-config.h"
|
||||
#include "obs-app.hpp"
|
||||
#include "platform.hpp"
|
||||
using namespace std;
|
||||
|
@ -20,6 +20,7 @@
|
||||
* Even if there are not multiple monitors, this should still work.
|
||||
*/
|
||||
|
||||
#include <obs-config.h>
|
||||
#include "obs-app.hpp"
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user