Reorganized RDTK headers

This commit is contained in:
Armin Novak 2022-02-16 11:10:11 +01:00 committed by akallabeth
parent 5e11f0da28
commit 8dc7c2b612
12 changed files with 31 additions and 45 deletions

View File

@ -96,11 +96,11 @@ endif()
SetFreeRDPCMakeInstallDir(RDTK_CMAKE_INSTALL_DIR "rdtk${RDTK_VERSION_MAJOR}") SetFreeRDPCMakeInstallDir(RDTK_CMAKE_INSTALL_DIR "rdtk${RDTK_VERSION_MAJOR}")
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}/templates) set(RDTK_INCLUDE_DIR include/rdtk${RDTK_API_VERSION})
add_subdirectory(librdtk) add_subdirectory(librdtk)
add_subdirectory(include)
add_subdirectory(templates) add_subdirectory(templates)
add_subdirectory(include)
install(EXPORT rdtk DESTINATION ${RDTK_CMAKE_INSTALL_DIR}) install(EXPORT rdtk DESTINATION ${RDTK_CMAKE_INSTALL_DIR})

View File

@ -1,2 +1,8 @@
file(GLOB RDTK_HEADERS "rdtk/*.h") install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
install(FILES ${RDTK_HEADERS} DESTINATION include/rdtk${RDTK_API_VERSION}/rdtk COMPONENT headers) DESTINATION ${RDTK_INCLUDE_DIR}
FILES_MATCHING PATTERN "*.h")
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/
DESTINATION ${RDTK_INCLUDE_DIR}
FILES_MATCHING PATTERN "*.h")

View File

@ -16,9 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
#ifdef HAVE_CONFIG_H #include <rdtk/config.h>
#include "config.h"
#endif
#include "rdtk_font.h" #include "rdtk_font.h"

View File

@ -16,9 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
#ifdef HAVE_CONFIG_H #include <rdtk/config.h>
#include "config.h"
#endif
#include "rdtk_font.h" #include "rdtk_font.h"
#include "rdtk_nine_patch.h" #include "rdtk_nine_patch.h"

View File

@ -16,9 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
#ifdef HAVE_CONFIG_H #include <rdtk/config.h>
#include "config.h"
#endif
#include <errno.h> #include <errno.h>

View File

@ -16,9 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
#ifdef HAVE_CONFIG_H #include <rdtk/config.h>
#include "config.h"
#endif
#include "rdtk_font.h" #include "rdtk_font.h"

View File

@ -16,9 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
#ifdef HAVE_CONFIG_H #include <rdtk/config.h>
#include "config.h"
#endif
#include "rdtk_resources.h" #include "rdtk_resources.h"

View File

@ -16,9 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
#ifdef HAVE_CONFIG_H #include <rdtk/config.h>
#include "config.h"
#endif
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>

View File

@ -16,9 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
#ifdef HAVE_CONFIG_H #include <rdtk/config.h>
#include "config.h"
#endif
#include "rdtk_surface.h" #include "rdtk_surface.h"

View File

@ -16,9 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
#ifdef HAVE_CONFIG_H #include <rdtk/config.h>
#include "config.h"
#endif
#include "rdtk_font.h" #include "rdtk_font.h"

View File

@ -16,9 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
#ifdef HAVE_CONFIG_H #include <rdtk/config.h>
#include "config.h"
#endif
#include <stdint.h> #include <stdint.h>

View File

@ -1,8 +1,6 @@
include (SetFreeRDPCMakeInstallDir) include (SetFreeRDPCMakeInstallDir)
set(RDTK_INCLUDE_DIR "include/rdtk${RDTK_VERSION_MAJOR}")
# cmake package # cmake package
export(PACKAGE rdtk) export(PACKAGE rdtk)
@ -24,22 +22,22 @@ FOREACH(var ${res})
LIST(APPEND RDTK_BUILD_CONFIG_LIST "${var}=${${var}}") LIST(APPEND RDTK_BUILD_CONFIG_LIST "${var}=${${var}}")
ENDIF() ENDIF()
ENDFOREACH() ENDFOREACH()
string(REPLACE ";" " " RDTK_BUILD_CONFIG "${RDTK_BUILD_CONFIG_LIST}") string(REPLACE ";" " " RDTK_BUILD_CONFIG "${RDTK_BUILD_CONFIG_LIST}")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/../include/rdtk/version.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/buildflags.h.in ${CMAKE_CURRENT_BINARY_DIR}/buildflags.h) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/buildflags.h.in ${CMAKE_CURRENT_BINARY_DIR}/../include/rdtk/buildflags.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/build-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/build-config.h) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/build-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/../include/rdtk/build-config.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/../include/rdtk/config.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rdtk.pc.in ${CMAKE_CURRENT_BINARY_DIR}/rdtk${RDTK_VERSION_MAJOR}.pc @ONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rdtk.pc.in ${CMAKE_CURRENT_BINARY_DIR}/rdtk${RDTK_VERSION_MAJOR}.pc @ONLY)
set(RDTK_INSTALL_INCLUDE_DIR include/rdtk${RDTK_API_VERSION}/rdtk) set(RDTK_INSTALL_INCLUDE_DIR ${RDTK_INCLUDE_DIR}/rdtk)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/version.h DESTINATION ${RDTK_INSTALL_INCLUDE_DIR} COMPONENT headers)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h DESTINATION ${RDTK_INSTALL_INCLUDE_DIR} COMPONENT headers)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/build-config.h DESTINATION ${RDTK_INSTALL_INCLUDE_DIR} COMPONENT headers)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/buildflags.h DESTINATION ${RDTK_INSTALL_INCLUDE_DIR} COMPONENT headers)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rdtk${RDTK_VERSION_MAJOR}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
install(FILES install(FILES
${CMAKE_CURRENT_BINARY_DIR}/rdtkConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/rdtk${RDTK_VERSION_MAJOR}.pc
${CMAKE_CURRENT_BINARY_DIR}/rdtkConfigVersion.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/rdtkConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/rdtkConfigVersion.cmake
DESTINATION ${RDTK_CMAKE_INSTALL_DIR}) DESTINATION ${RDTK_CMAKE_INSTALL_DIR})