Merge pull request #10781 from akallabeth/nightly-update
Nightly update
This commit is contained in:
commit
e4e6e254a2
@ -106,10 +106,16 @@ if (SDL_USE_COMPILED_RESOURCES)
|
||||
endforeach()
|
||||
write_file(${FINIT} "}" APPEND)
|
||||
else()
|
||||
set(SDL_RESOURCE_ROOT ${CMAKE_INSTALL_FULL_DATAROOTDIR}/FreeRDP)
|
||||
if (WITH_BINARY_VERSIONING)
|
||||
string(APPEND SDL_RESOURCE_ROOT "${PROJECT_VERSION_MAJOR}")
|
||||
endif()
|
||||
option(SDL_USE_VENDOR_PRODUCT_CONFIG_DIR "Use <vendor>/<product> path for resources" OFF)
|
||||
set(SDL_RESOURCE_ROOT ${CMAKE_INSTALL_FULL_DATAROOTDIR})
|
||||
if (SDL_USE_VENDOR_PRODUCT_CONFIG_DIR)
|
||||
string(APPEND SDL_RESOURCE_ROOT "/${VENDOR}")
|
||||
endif()
|
||||
string(APPEND SDL_RESOURCE_ROOT "/${PRODUCT}")
|
||||
|
||||
if (WITH_BINARY_VERSIONING)
|
||||
string(APPEND SDL_RESOURCE_ROOT "${FREERDP_VERSION_MAJOR}")
|
||||
endif()
|
||||
|
||||
add_definitions(-DSDL_RESOURCE_ROOT="${SDL_RESOURCE_ROOT}")
|
||||
|
||||
|
11
cmake/CFlagsToVar.cmake
Normal file
11
cmake/CFlagsToVar.cmake
Normal file
@ -0,0 +1,11 @@
|
||||
function(CFlagsToVar NAME)
|
||||
set(C_FLAGS ${CMAKE_C_FLAGS})
|
||||
if (CMAKE_BUILD_TYPE)
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" CAPS_BUILD_TYPE)
|
||||
string(APPEND C_FLAGS " ${CMAKE_C_FLAGS_${CAPS_BUILD_TYPE}}")
|
||||
endif()
|
||||
string(REPLACE "\$" "\\\$" C_FLAGS "${C_FLAGS}")
|
||||
string(REPLACE "\"" "\\\"" C_FLAGS "${C_FLAGS}")
|
||||
set(${NAME} ${C_FLAGS} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
@ -3,6 +3,7 @@ option(CMAKE_VERBOSE_MAKEFILE "verbose CMake makefile" ON)
|
||||
option(CMAKE_POSITION_INDEPENDENT_CODE "build with position independent code (-fPIC or -fPIE)" ON)
|
||||
option(WITH_LIBRARY_VERSIONING "Use library version triplet" ON)
|
||||
option(WITH_BINARY_VERSIONING "Use binary versioning" OFF)
|
||||
option(WITH_RESOURCE_VERSIONING "Use resource versioning" OFF)
|
||||
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
|
||||
|
||||
# We want to control the winpr assert for the whole project
|
||||
|
@ -38,11 +38,8 @@ if (WIN32)
|
||||
string(REPLACE "\\" "\\\\" NATIVE_FREERDP_PROXY_PLUGINDIR "${NATIVE_FREERDP_PROXY_PLUGINDIR}")
|
||||
endif()
|
||||
|
||||
set(C_FLAGS ${CMAKE_C_FLAGS})
|
||||
if (CMAKE_BUILD_TYPE)
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" CAPS_BUILD_TYPE)
|
||||
string(APPEND C_FLAGS " ${CMAKE_C_FLAGS_${CAPS_BUILD_TYPE}}")
|
||||
endif()
|
||||
include(CFlagsToVar)
|
||||
CFlagsToVar(C_FLAGS)
|
||||
|
||||
cleaning_configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/freerdp/version.h)
|
||||
cleaning_configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config/build-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/freerdp/build-config.h)
|
||||
|
@ -18,6 +18,17 @@
|
||||
set(MODULE_NAME "freerdp")
|
||||
set(MODULE_PREFIX "FREERDP")
|
||||
|
||||
option(FREERDP_USE_VENDOR_PRODUCT_CONFIG_DIR "Use <vendor>/<product> path for resources" OFF)
|
||||
set(FREERDP_RESOURCE_ROOT ${CMAKE_INSTALL_FULL_DATAROOTDIR})
|
||||
if (FREERDP_USE_VENDOR_PRODUCT_CONFIG_DIR)
|
||||
string(APPEND FREERDP_RESOURCE_ROOT "/${VENDOR}")
|
||||
endif()
|
||||
string(APPEND FREERDP_RESOURCE_ROOT "/${PRODUCT}")
|
||||
|
||||
if (WITH_RESOURCE_VERSIONING)
|
||||
string(APPEND FREERDP_RESOURCE_ROOT "${FREERDP_VERSION_MAJOR}")
|
||||
endif()
|
||||
|
||||
# CMake modules includes
|
||||
include(FindCairo)
|
||||
|
||||
@ -198,6 +209,13 @@ endif()
|
||||
|
||||
AddTargetWithResourceFile(${MODULE_NAME} FALSE "${FREERDP_VERSION}" LIBFREERDP_SRCS)
|
||||
|
||||
if (WITH_RESOURCE_VERSIONING)
|
||||
target_compile_definitions(${MODULE_NAME} PRIVATE -DWITH_RESOURCE_VERSIONING)
|
||||
endif()
|
||||
if (FREERDP_USE_VENDOR_PRODUCT_CONFIG_DIR)
|
||||
target_compile_definitions(${MODULE_NAME} PRIVATE -DFREERDP_USE_VENDOR_PRODUCT_CONFIG_DIR)
|
||||
endif()
|
||||
|
||||
add_definitions(${LIBFREERDP_DEFINITIONS})
|
||||
|
||||
if (LIBFREERDP_COMPILE_OPTIONS)
|
||||
|
@ -45,8 +45,7 @@ set(APPLE_SRCS
|
||||
include(CMakeDependentOption)
|
||||
cmake_dependent_option(WITH_KEYBOARD_LAYOUT_FROM_FILE "Use keyboard definitions from JSON file" OFF WITH_WINPR_JSON OFF)
|
||||
if (WITH_KEYBOARD_LAYOUT_FROM_FILE)
|
||||
set(FREERDP_RESOURCE_ROOT ${CMAKE_INSTALL_FULL_DATAROOTDIR}/${PRODUCT})
|
||||
freerdp_definition_add(-DFREERDP_RESOURCE_ROOT="${FREERDP_RESOURCE_ROOT}")
|
||||
freerdp_definition_add(-DFREERDP_RESOURCE_ROOT="${FREERDP_RESOURCE_ROOT}")
|
||||
freerdp_definition_add(-DWITH_KEYBOARD_LAYOUT_FROM_FILE)
|
||||
|
||||
install(FILES KeyboardLayoutMap.json DESTINATION ${FREERDP_RESOURCE_ROOT})
|
||||
|
@ -21,17 +21,30 @@
|
||||
#include <freerdp/utils/helpers.h>
|
||||
|
||||
#include <winpr/path.h>
|
||||
#include <freerdp/version.h>
|
||||
#include <freerdp/build-config.h>
|
||||
|
||||
#define STR(x) #x
|
||||
|
||||
char* freerdp_GetConfigFilePath(BOOL system, const char* filename)
|
||||
{
|
||||
eKnownPathTypes id = system ? KNOWN_PATH_SYSTEM_CONFIG_HOME : KNOWN_PATH_XDG_CONFIG_HOME;
|
||||
|
||||
#if defined(FREERDP_USE_VENDOR_PRODUCT_CONFIG_DIR)
|
||||
char* vendor = GetKnownSubPath(id, FREERDP_VENDOR_STRING);
|
||||
#else
|
||||
char* vendor = GetKnownPath(id);
|
||||
#endif
|
||||
if (!vendor)
|
||||
return NULL;
|
||||
|
||||
char* base = GetCombinedPath(vendor, FREERDP_PRODUCT_STRING);
|
||||
#if defined(WITH_RESOURCE_VERSIONING)
|
||||
char* verstr = FREERDP_PRODUCT_STRING STR(FREERDP_VERSION_MAJOR);
|
||||
#else
|
||||
char* verstr = FREERDP_PRODUCT_STRING;
|
||||
#endif
|
||||
|
||||
char* base = GetCombinedPath(vendor, verstr);
|
||||
free(vendor);
|
||||
|
||||
if (!base)
|
||||
|
@ -3,5 +3,6 @@ opt/freerdp-nightly/lib/freerdp3/proxy/*.so*
|
||||
opt/freerdp-nightly/bin
|
||||
opt/freerdp-nightly/share/man/man1/*
|
||||
opt/freerdp-nightly/share/man/man7/*
|
||||
opt/freerdp-nightly/share/FreeRDP3/fonts/*
|
||||
opt/freerdp-nightly/share/FreeRDP3/images/*
|
||||
opt/freerdp-nightly/share/FreeRDP/FreeRDP3/*
|
||||
opt/freerdp-nightly/share/FreeRDP/FreeRDP3/fonts/*
|
||||
opt/freerdp-nightly/share/FreeRDP/FreeRDP3/images/*
|
||||
|
@ -7,38 +7,49 @@ DEB_HOST_ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH)
|
||||
SANITIZE_ADDRESS = -DWITH_SANITIZE_ADDRESS=ON
|
||||
|
||||
DEB_CMAKE_EXTRA_FLAGS := -GNinja \
|
||||
-DCMAKE_SKIP_RPATH=FALSE \
|
||||
-DCMAKE_SKIP_INSTALL_RPATH=FALSE \
|
||||
-DWITH_PULSE=ON \
|
||||
-DWITH_CHANNELS=ON \
|
||||
-DWITH_AAD=ON \
|
||||
-DWITH_CUPS=ON \
|
||||
-DWITH_KRB5=ON \
|
||||
-DWITH_PCSC=ON \
|
||||
-DWITH_FFMPEG=ON \
|
||||
-DWITH_OPUS=ON \
|
||||
-DWITH_DSP_FFMPEG=ON \
|
||||
-DWITH_FREERDP_DEPRECATED_COMMANDLINE=ON \
|
||||
-DWITH_SERVER=ON \
|
||||
-DWITH_WAYLAND=ON \
|
||||
-DWITH_CAIRO=ON \
|
||||
-DWITH_URIPARSER=ON \
|
||||
-DWITH_WINPR_UTILS_IMAGE_PNG=ON \
|
||||
-DWITH_WINPR_UTILS_IMAGE_WEBP=ON \
|
||||
-DWITH_WINPR_UTILS_IMAGE_JPEG=ON \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DSDL_USE_COMPILED_RESOURCES=OFF \
|
||||
-DWITH_SDL_IMAGE_DIALOGS=ON \
|
||||
-DRDTK_FORCE_STATIC_BUILD=ON \
|
||||
-DUWAC_FORCE_STATIC_BUILD=ON \
|
||||
-DWITH_BINARY_VERSIONING=ON \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_INSTALL_PREFIX=/opt/freerdp-nightly/ \
|
||||
-DCMAKE_INSTALL_INCLUDEDIR=include \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DNO_CMAKE_PACKAGE_REGISTRY=ON \
|
||||
$(SANITIZE_ADDRESS) \
|
||||
$(NULL)
|
||||
-DCMAKE_SKIP_RPATH=FALSE \
|
||||
-DCMAKE_SKIP_INSTALL_RPATH=FALSE \
|
||||
-DWITH_PULSE=ON \
|
||||
-DWITH_CHANNELS=ON \
|
||||
-DWITH_AAD=ON \
|
||||
-DWITH_CUPS=ON \
|
||||
-DWITH_KRB5=ON \
|
||||
-DWITH_PCSC=ON \
|
||||
-DWITH_FFMPEG=ON \
|
||||
-DWITH_OPUS=ON \
|
||||
-DWITH_DSP_FFMPEG=ON \
|
||||
-DWITH_FREERDP_DEPRECATED_COMMANDLINE=ON \
|
||||
-DWITH_SERVER=ON \
|
||||
-DWITH_WAYLAND=ON \
|
||||
-DWITH_CAIRO=ON \
|
||||
-DWITH_URIPARSER=ON \
|
||||
-DWITH_WINPR_UTILS_IMAGE_PNG=ON \
|
||||
-DWITH_WINPR_UTILS_IMAGE_WEBP=ON \
|
||||
-DWITH_WINPR_UTILS_IMAGE_JPEG=ON \
|
||||
-DWITH_INTERNAL_RC4=ON \
|
||||
-DWITH_INTERNAL_MD4=ON \
|
||||
-DWITH_INTERNAL_MD5=ON \
|
||||
-DBUILD_TESTING=ON \
|
||||
-DWITH_KEYBOARD_LAYOUT_FROM_FILE=ON \
|
||||
-DWITH_TIMEZONE_FROM_FILE=ON \
|
||||
-DSDL_USE_COMPILED_RESOURCES=OFF \
|
||||
-DWITH_SDL_IMAGE_DIALOGS=ON \
|
||||
-DRDTK_FORCE_STATIC_BUILD=ON \
|
||||
-DUWAC_FORCE_STATIC_BUILD=ON \
|
||||
-DWITH_BINARY_VERSIONING=ON \
|
||||
-DWITH_RESOURCE_VERSIONING=ON \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_INSTALL_PREFIX=/opt/freerdp-nightly/ \
|
||||
-DCMAKE_INSTALL_INCLUDEDIR=include \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DNO_CMAKE_PACKAGE_REGISTRY=ON \
|
||||
-DWINPR_USE_LEGACY_RESOURCE_DIR=OFF \
|
||||
-DWINPR_USE_VENDOR_PRODUCT_CONFIG_DIR=ON \
|
||||
-DFREERDP_USE_VENDOR_PRODUCT_CONFIG_DIR=ON \
|
||||
-DSAMPLE_USE_VENDOR_PRODUCT_CONFIG_DIR=ON \
|
||||
-DSDL_USE_VENDOR_PRODUCT_CONFIG_DIR=ON \
|
||||
$(SANITIZE_ADDRESS) \
|
||||
$(NULL)
|
||||
|
||||
%:
|
||||
dh $@ --parallel
|
||||
@ -62,7 +73,7 @@ override_dh_install:
|
||||
dh_install
|
||||
|
||||
override_dh_auto_test:
|
||||
true
|
||||
dh_auto_test
|
||||
|
||||
override_dh_clean:
|
||||
rm -f config.h
|
||||
|
@ -153,9 +153,20 @@ cp %{_topdir}/SOURCES/source_version freerdp-nightly-%{version}/.source_version
|
||||
-DWITH_PCSC=ON \
|
||||
-DWITH_JPEG=ON \
|
||||
-DWITH_OPUS=ON \
|
||||
-DWITH_INTERNAL_RC4=ON \
|
||||
-DWITH_INTERNAL_MD4=ON \
|
||||
-DWITH_INTERNAL_MD5=ON \
|
||||
-DWITH_KEYBOARD_LAYOUT_FROM_FILE=ON \
|
||||
-DWITH_TIMEZONE_FROM_FILE=ON \
|
||||
-DSDL_USE_COMPILED_RESOURCES=OFF \
|
||||
-DWITH_SDL_IMAGE_DIALOGS=ON \
|
||||
-DWITH_BINARY_VERSIONING=ON \
|
||||
-DWITH_RESOURCE_VERSIONING=ON \
|
||||
-DWINPR_USE_VENDOR_PRODUCT_CONFIG_DIR=ON \
|
||||
-DFREERDP_USE_VENDOR_PRODUCT_CONFIG_DIR=ON \
|
||||
-DSAMPLE_USE_VENDOR_PRODUCT_CONFIG_DIR=ON \
|
||||
-DSDL_USE_VENDOR_PRODUCT_CONFIG_DIR=ON \
|
||||
-DWINPR_USE_LEGACY_RESOURCE_DIR=OFF \
|
||||
-DRDTK_FORCE_STATIC_BUILD=ON \
|
||||
-DUWAC_FORCE_STATIC_BUILD=ON \
|
||||
%if 0%{?fedora} >= 36 || 0%{?rhel} >= 9 || 0%{?suse_version}
|
||||
@ -176,13 +187,16 @@ cp %{_topdir}/SOURCES/source_version freerdp-nightly-%{version}/.source_version
|
||||
-DCHANNEL_URBDRC_CLIENT=ON \
|
||||
-DWITH_SERVER=ON \
|
||||
-DWITH_CAIRO=ON \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DBUILD_TESTING=ON \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_INSTALL_PREFIX=%{INSTALL_PREFIX} \
|
||||
-DCMAKE_INSTALL_LIBDIR=%{_lib}
|
||||
|
||||
%cmake_build
|
||||
|
||||
%check
|
||||
%cmake_build --target test
|
||||
|
||||
%install
|
||||
|
||||
%cmake_install
|
||||
@ -199,17 +213,17 @@ export NO_BRP_CHECK_RPATH true
|
||||
%dir %{INSTALL_PREFIX}/share/man/
|
||||
%dir %{INSTALL_PREFIX}/share/man/man1
|
||||
%dir %{INSTALL_PREFIX}/share/man/man7
|
||||
%dir %{INSTALL_PREFIX}/share/FreeRDP3
|
||||
%dir %{INSTALL_PREFIX}/share/FreeRDP3/fonts
|
||||
%dir %{INSTALL_PREFIX}/share/FreeRDP3/images
|
||||
%dir %{INSTALL_PREFIX}/share/FreeRDP/FreeRDP3
|
||||
%dir %{INSTALL_PREFIX}/share/FreeRDP/FreeRDP3/fonts
|
||||
%dir %{INSTALL_PREFIX}/share/FreeRDP/FreeRDP3/images
|
||||
%dir %{INSTALL_PREFIX}/%{_lib}/freerdp3/proxy/
|
||||
%{INSTALL_PREFIX}/%{_lib}/*.so.*
|
||||
%{INSTALL_PREFIX}/%{_lib}/freerdp3/proxy/*.so
|
||||
%{INSTALL_PREFIX}/bin/*
|
||||
%{INSTALL_PREFIX}/share/man/man1/*
|
||||
%{INSTALL_PREFIX}/share/man/man7/*
|
||||
%{INSTALL_PREFIX}/share/FreeRDP3/fonts/*
|
||||
%{INSTALL_PREFIX}/share/FreeRDP3/images/*
|
||||
%{INSTALL_PREFIX}/share/FreeRDP/FreeRDP3/fonts/*
|
||||
%{INSTALL_PREFIX}/share/FreeRDP/FreeRDP3/images/*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
@ -223,6 +237,8 @@ export NO_BRP_CHECK_RPATH true
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%changelog
|
||||
* Thu Oct 10 2024 FreeRDP Team <team@freerdp.com> - 3.10.0-1
|
||||
- update resource locations, utilize new settings
|
||||
* Wed Apr 10 2024 FreeRDP Team <team@freerdp.com> - 3.0.0-5
|
||||
- Fix exclusion of libuwac and librdtk
|
||||
* Fri Feb 09 2024 FreeRDP Team <team@freerdp.com> - 3.0.0-4
|
||||
|
@ -32,11 +32,17 @@ if (CHANNEL_AINPUT_SERVER)
|
||||
list(APPEND SRCS sf_ainput.c sf_ainput.h)
|
||||
endif()
|
||||
|
||||
if (WITH_BINARY_VERSIONING)
|
||||
set(SAMPLE_RESOURCE_ROOT ${CMAKE_INSTALL_FULL_DATAROOTDIR}/FreeRDP${FREERDP_VERSION_MAJOR}/images)
|
||||
else()
|
||||
set(SAMPLE_RESOURCE_ROOT ${CMAKE_INSTALL_FULL_DATAROOTDIR}/FreeRDP/images)
|
||||
option(SAMPLE_USE_VENDOR_PRODUCT_CONFIG_DIR "Use <vendor>/<product> path for resources" OFF)
|
||||
set(SAMPLE_RESOURCE_ROOT ${CMAKE_INSTALL_FULL_DATAROOTDIR})
|
||||
if (SAMPLE_USE_VENDOR_PRODUCT_CONFIG_DIR)
|
||||
string(APPEND SAMPLE_RESOURCE_ROOT "/${VENDOR}")
|
||||
endif()
|
||||
string(APPEND SAMPLE_RESOURCE_ROOT "/${PRODUCT}")
|
||||
|
||||
if (WITH_RESOURCE_VERSIONING)
|
||||
string(APPEND SAMPLE_RESOURCE_ROOT "${FREERDP_VERSION_MAJOR}")
|
||||
endif()
|
||||
string(APPEND SAMPLE_RESOURCE_ROOT "/images")
|
||||
|
||||
set(SAMPLE_ICONS
|
||||
test_icon.bmp
|
||||
|
@ -33,11 +33,8 @@ FOREACH(var ${res})
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
||||
set(C_FLAGS ${CMAKE_C_FLAGS})
|
||||
if (CMAKE_BUILD_TYPE)
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" CAPS_BUILD_TYPE)
|
||||
string(APPEND C_FLAGS " ${CMAKE_C_FLAGS_${CAPS_BUILD_TYPE}}")
|
||||
endif()
|
||||
include(CFlagsToVar)
|
||||
CFlagsToVar(C_FLAGS)
|
||||
|
||||
string(REPLACE ";" " " UWAC_BUILD_CONFIG "${UWAC_BUILD_CONFIG_LIST}")
|
||||
cleaning_configure_file(version.h.in ${CMAKE_CURRENT_BINARY_DIR}/../include/uwac/version.h)
|
||||
|
@ -87,6 +87,8 @@ option(WITH_INTERNAL_RC4 "Use compiled in rc4 functions instead of OpenSSL/MBedT
|
||||
option(WITH_INTERNAL_MD4 "Use compiled in md4 hash functions instead of OpenSSL/MBedTLS" ${WITH_INTERNAL_MD4_DEFAULT})
|
||||
option(WITH_INTERNAL_MD5 "Use compiled in md5 hash functions instead of OpenSSL/MBedTLS" ${WITH_INTERNAL_MD5_DEFAULT})
|
||||
option(WITH_UNICODE_BUILTIN "Use built-in Unicode conversion (don't use system-provided libraries)" OFF)
|
||||
option(WINPR_USE_LEGACY_RESOURCE_DIR "use a resource directory of <base>/WinPR instead of <base>/<product>" ON)
|
||||
option(WINPR_USE_VENDOR_PRODUCT_CONFIG_DIR "use a configuration <base>/<product>/<vendor>/ subdirectory instead of </base>/winpr" OFF)
|
||||
|
||||
# This option MUST be off to avoid symbol conflicts when loading an external SSPI module library
|
||||
option(SSPI_DLL "Define and export SSPI API symbols for usage as a Windows SSPI DLL replacement" OFF)
|
||||
@ -158,6 +160,24 @@ else()
|
||||
set(WINPR_VERSION_FULL "${WINPR_VERSION}")
|
||||
endif()
|
||||
|
||||
set(WINPR_RESOURCE_ROOT ${CMAKE_INSTALL_FULL_DATAROOTDIR})
|
||||
|
||||
# Quite the compatiblity show here (newest to oldest):
|
||||
# * <base>[/<vendor>]/<product>[<version>]
|
||||
# * <base>[/<vendor>]/WinPR[<version>]
|
||||
# * <base>/winpr
|
||||
if (WINPR_USE_LEGACY_RESOURCE_DIR)
|
||||
string(APPEND WINPR_RESOURCE_ROOT "/WinPR")
|
||||
else()
|
||||
if (WINPR_USE_VENDOR_PRODUCT_CONFIG_DIR)
|
||||
string(APPEND WINPR_RESOURCE_ROOT "/${VENDOR}/")
|
||||
endif()
|
||||
string(APPEND WINPR_RESOURCE_ROOT "/${PRODUCT}")
|
||||
if (WITH_RESOURCE_VERSIONING)
|
||||
string(APPEND WINPR_RESOURCE_ROOT "${WINPR_VERSION_MAJOR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(CheckTypeSize)
|
||||
check_type_size(ssize_t SSIZE_T)
|
||||
set(WINPR_HAVE_SSIZE_T ${HAVE_SSIZE_T})
|
||||
|
@ -15,11 +15,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(C_FLAGS ${CMAKE_C_FLAGS})
|
||||
if (CMAKE_BUILD_TYPE)
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" CAPS_BUILD_TYPE)
|
||||
string(APPEND C_FLAGS " ${CMAKE_C_FLAGS_${CAPS_BUILD_TYPE}}")
|
||||
endif()
|
||||
include(CFlagsToVar)
|
||||
CFlagsToVar(C_FLAGS)
|
||||
|
||||
cleaning_configure_file(config/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/winpr/version.h)
|
||||
cleaning_configure_file(config/wtypes.h.in ${CMAKE_CURRENT_BINARY_DIR}/winpr/wtypes.h)
|
||||
|
@ -20,6 +20,4 @@
|
||||
|
||||
#define WINPR_PROXY_PLUGINDIR "${WINPR_PROXY_PLUGINDIR}"
|
||||
|
||||
#cmakedefine WINPR_USE_VENDOR_PRODUCT_CONFIG_DIR
|
||||
|
||||
#endif /* WINPR_BUILD_CONFIG_H */
|
||||
|
@ -167,6 +167,13 @@ list(REMOVE_DUPLICATES WINPR_INCLUDES)
|
||||
|
||||
AddTargetWithResourceFile(${MODULE_NAME} FALSE "${WINPR_VERSION}" WINPR_SRCS)
|
||||
|
||||
if (WITH_RESOURCE_VERSIONING)
|
||||
target_compile_definitions(${MODULE_NAME} PRIVATE -DWITH_RESOURCE_VERSIONING)
|
||||
endif()
|
||||
if (WINPR_USE_VENDOR_PRODUCT_CONFIG_DIR)
|
||||
target_compile_definitions(${MODULE_NAME} PRIVATE -DWINPR_USE_VENDOR_PRODUCT_CONFIG_DIR)
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION FALSE)
|
||||
endif()
|
||||
|
@ -17,8 +17,6 @@
|
||||
|
||||
winpr_module_add(path.c shell.c)
|
||||
|
||||
option(WINPR_USE_VENDOR_PRODUCT_CONFIG_DIR "use a configuration <base>/<product>/<vendor>/ subdirectory instead of </base>/winpr" OFF)
|
||||
|
||||
if (MSVC OR MINGW)
|
||||
winpr_library_add_public(shlwapi)
|
||||
endif()
|
||||
|
@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include <winpr/config.h>
|
||||
#include <winpr/version.h>
|
||||
#include <winpr/build-config.h>
|
||||
|
||||
#include <winpr/crt.h>
|
||||
@ -26,6 +27,8 @@
|
||||
#include <winpr/path.h>
|
||||
#include <winpr/file.h>
|
||||
|
||||
#define STR(x) #x
|
||||
|
||||
#define PATH_SLASH_CHR '/'
|
||||
#define PATH_SLASH_STR "/"
|
||||
|
||||
@ -1190,7 +1193,12 @@ char* winpr_GetConfigFilePath(BOOL system, const char* filename)
|
||||
char* vendor = GetKnownSubPath(id, WINPR_VENDOR_STRING);
|
||||
if (!vendor)
|
||||
return NULL;
|
||||
char* base = GetCombinedPath(vendor, WINPR_PRODUCT_STRING);
|
||||
#if defined(WITH_RESOURCE_VERSIONING)
|
||||
const char* prod = WINPR_PRODUCT_STRING STR(WINPR_VERSION_MAJOR);
|
||||
#else
|
||||
const char* prod = WINPR_PRODUCT_STRING;
|
||||
#endif
|
||||
char* base = GetCombinedPath(vendor, prod);
|
||||
free(vendor);
|
||||
#else
|
||||
char* base = GetKnownSubPath(id, "winpr");
|
||||
|
@ -23,7 +23,7 @@ endif()
|
||||
include(CMakeDependentOption)
|
||||
cmake_dependent_option(WITH_TIMEZONE_FROM_FILE "Use timezone definitions from JSON file" OFF WITH_WINPR_JSON OFF)
|
||||
if (WITH_TIMEZONE_FROM_FILE)
|
||||
set(WINPR_RESOURCE_ROOT ${CMAKE_INSTALL_FULL_DATAROOTDIR}/WinPR)
|
||||
|
||||
winpr_definition_add(-DWINPR_RESOURCE_ROOT="${WINPR_RESOURCE_ROOT}")
|
||||
winpr_definition_add(-DWITH_TIMEZONE_FROM_FILE)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user