summaryrefslogtreecommitdiffstats
path: root/rdtk/librdtk
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:25:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:25:11 +0000
commit941f9937e0744d18de4cc0afa71e0caa925d82ac (patch)
tree67872b86dbf72d73e91188bf8de12594668fe4aa /rdtk/librdtk
parentAdding upstream version 3.3.0+dfsg1. (diff)
downloadfreerdp3-941f9937e0744d18de4cc0afa71e0caa925d82ac.tar.xz
freerdp3-941f9937e0744d18de4cc0afa71e0caa925d82ac.zip
Adding upstream version 3.5.0+dfsg1.upstream/3.5.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'rdtk/librdtk')
-rw-r--r--rdtk/librdtk/CMakeLists.txt29
-rw-r--r--rdtk/librdtk/rdtk_font.c2
2 files changed, 2 insertions, 29 deletions
diff --git a/rdtk/librdtk/CMakeLists.txt b/rdtk/librdtk/CMakeLists.txt
index 03e0418..e872c23 100644
--- a/rdtk/librdtk/CMakeLists.txt
+++ b/rdtk/librdtk/CMakeLists.txt
@@ -36,35 +36,13 @@ set(${MODULE_PREFIX}_SRCS
rdtk_engine.c
rdtk_engine.h)
-# On windows create dll version information.
-# Vendor, product and year are already set in top level CMakeLists.txt
-if (WIN32)
- set (RC_VERSION_MAJOR ${RDTK_VERSION_MAJOR})
- set (RC_VERSION_MINOR ${RDTK_VERSION_MINOR})
- set (RC_VERSION_BUILD ${RDTK_VERSION_REVISION})
- set (RC_VERSION_FILE "${CMAKE_SHARED_LIBRARY_PREFIX}${MODULE_NAME}${RDTK_API_VERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}" )
-
- configure_file(
- ${PROJECT_SOURCE_DIR}/cmake/WindowsDLLVersion.rc.in
- ${CMAKE_CURRENT_BINARY_DIR}/version.rc
- @ONLY)
-
- list (APPEND ${MODULE_PREFIX}_SRCS ${CMAKE_CURRENT_BINARY_DIR}/version.rc)
-endif()
-
-add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
+AddTargetWithResourceFile(${MODULE_NAME} FALSE "${RDTK_VERSION}" ${MODULE_PREFIX}_SRCS)
list(APPEND ${MODULE_PREFIX}_LIBS winpr)
target_include_directories(${MODULE_NAME} INTERFACE $<INSTALL_INTERFACE:include>)
target_link_libraries(${MODULE_NAME} PRIVATE ${${MODULE_PREFIX}_LIBS})
-set_target_properties(${MODULE_NAME} PROPERTIES LINKER_LANGUAGE C)
-set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME ${MODULE_NAME}${RDTK_API_VERSION})
-if (WITH_LIBRARY_VERSIONING)
- set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${RDTK_VERSION} SOVERSION ${RDTK_API_VERSION})
-endif()
-
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "RdTk")
if(BUILD_TESTING)
@@ -76,9 +54,4 @@ if (NOT RDTK_FORCE_STATIC_BUILD)
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
-
- if (WITH_DEBUG_SYMBOLS AND MSVC AND BUILD_SHARED_LIBS)
- get_target_property(OUTPUT_FILENAME ${MODULE_NAME} OUTPUT_NAME)
- install(FILES ${CMAKE_PDB_BINARY_DIR}/${OUTPUT_FILENAME}.pdb DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT symbols)
- endif()
endif()
diff --git a/rdtk/librdtk/rdtk_font.c b/rdtk/librdtk/rdtk_font.c
index ccd8f46..c44e952 100644
--- a/rdtk/librdtk/rdtk_font.c
+++ b/rdtk/librdtk/rdtk_font.c
@@ -410,7 +410,7 @@ static int rdtk_font_parse_descriptor_buffer(rdtkFont* font, uint8_t* buffer, si
*r = '\0';
/* start parsing glyph */
- if (index > font->glyphCount)
+ if (index >= font->glyphCount)
return -1;
rdtkGlyph* glyph = &font->glyphs[index];