summaryrefslogtreecommitdiffstats
path: root/rdtk/templates
diff options
context:
space:
mode:
Diffstat (limited to 'rdtk/templates')
-rw-r--r--rdtk/templates/CMakeLists.txt48
-rw-r--r--rdtk/templates/build-config.h.in20
-rw-r--r--rdtk/templates/buildflags.h.in11
-rw-r--r--rdtk/templates/config.h.in4
-rw-r--r--rdtk/templates/rdtk.pc.in15
-rw-r--r--rdtk/templates/rdtkConfig.cmake.in9
-rw-r--r--rdtk/templates/version.h.in32
7 files changed, 139 insertions, 0 deletions
diff --git a/rdtk/templates/CMakeLists.txt b/rdtk/templates/CMakeLists.txt
new file mode 100644
index 0000000..fd00820
--- /dev/null
+++ b/rdtk/templates/CMakeLists.txt
@@ -0,0 +1,48 @@
+
+if (NOT RDTK_FORCE_STATIC_BUILD)
+ include (SetFreeRDPCMakeInstallDir)
+
+ # cmake package
+ export(PACKAGE rdtk)
+
+ configure_package_config_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/rdtkConfig.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/rdtkConfig.cmake
+ INSTALL_DESTINATION ${RDTK_CMAKE_INSTALL_DIR}
+ PATH_VARS RDTK_INCLUDE_DIR)
+
+ write_basic_package_version_file(
+ ${CMAKE_CURRENT_BINARY_DIR}/rdtkConfigVersion.cmake
+ VERSION ${RDTK_VERSION}
+ COMPATIBILITY SameMajorVersion)
+endif()
+
+set(RDTK_BUILD_CONFIG_LIST "")
+GET_CMAKE_PROPERTY(res VARIABLES)
+FOREACH(var ${res})
+ IF (var MATCHES "^WITH_*|^BUILD_TESTING|^RDTK_HAVE_*")
+ LIST(APPEND RDTK_BUILD_CONFIG_LIST "${var}=${${var}}")
+ ENDIF()
+ENDFOREACH()
+
+include(pkg-config-install-prefix)
+
+string(REPLACE ";" " " RDTK_BUILD_CONFIG "${RDTK_BUILD_CONFIG_LIST}")
+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}/../include/rdtk/buildflags.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}/../include/rdtk/config.h)
+
+if (NOT RDTK_FORCE_STATIC_BUILD)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rdtk.pc.in ${CMAKE_CURRENT_BINARY_DIR}/rdtk${RDTK_VERSION_MAJOR}.pc @ONLY)
+
+ set(RDTK_INSTALL_INCLUDE_DIR ${RDTK_INCLUDE_DIR}/rdtk)
+ install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/rdtk${RDTK_VERSION_MAJOR}.pc
+ DESTINATION ${PKG_CONFIG_PC_INSTALL_DIR})
+
+ install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/rdtkConfig.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/rdtkConfigVersion.cmake
+ DESTINATION ${RDTK_CMAKE_INSTALL_DIR})
+endif()
diff --git a/rdtk/templates/build-config.h.in b/rdtk/templates/build-config.h.in
new file mode 100644
index 0000000..f1fe835
--- /dev/null
+++ b/rdtk/templates/build-config.h.in
@@ -0,0 +1,20 @@
+#ifndef RDTK_BUILD_CONFIG_H
+#define RDTK_BUILD_CONFIG_H
+
+#define RDTK_DATA_PATH "${WINPR_DATA_PATH}"
+#define RDTK_KEYMAP_PATH "${WINPR_KEYMAP_PATH}"
+#define RDTK_PLUGIN_PATH "${WINPR_PLUGIN_PATH}"
+
+#define RDTK_INSTALL_PREFIX "${WINPR_INSTALL_PREFIX}"
+
+#define RDTK_LIBRARY_PATH "${WINPR_LIBRARY_PATH}"
+
+#define RDTK_ADDIN_PATH "${WINPR_ADDIN_PATH}"
+
+#define RDTK_SHARED_LIBRARY_SUFFIX "${CMAKE_SHARED_LIBRARY_SUFFIX}"
+#define RDTK_SHARED_LIBRARY_PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}"
+
+#define RDTK_VENDOR_STRING "${VENDOR}"
+#define RDTK_PRODUCT_STRING "${PRODUCT}"
+
+#endif /* RDTK_BUILD_CONFIG_H */
diff --git a/rdtk/templates/buildflags.h.in b/rdtk/templates/buildflags.h.in
new file mode 100644
index 0000000..03839dd
--- /dev/null
+++ b/rdtk/templates/buildflags.h.in
@@ -0,0 +1,11 @@
+#ifndef RDTK_BUILD_FLAGS_H
+#define RDTK_BUILD_FLAGS_H
+
+#define RDTK_CFLAGS "${CMAKE_C_FLAGS}"
+#define RDTK_COMPILER_ID "${CMAKE_C_COMPILER_ID}"
+#define RDTK_COMPILER_VERSION "${CMAKE_C_COMPILER_VERSION}"
+#define RDTK_TARGET_ARCH "${TARGET_ARCH}"
+#define RDTK_BUILD_CONFIG "${RDTK_BUILD_CONFIG}"
+#define RDTK_BUILD_TYPE "${CMAKE_BUILD_TYPE}"
+
+#endif /* RDTK_BUILD_FLAGS_H */
diff --git a/rdtk/templates/config.h.in b/rdtk/templates/config.h.in
new file mode 100644
index 0000000..c6243d3
--- /dev/null
+++ b/rdtk/templates/config.h.in
@@ -0,0 +1,4 @@
+#ifndef RDTK_CONFIG_H
+#define RDTK_CONFIG_H
+
+#endif /* RDTK_CONFIG_H */
diff --git a/rdtk/templates/rdtk.pc.in b/rdtk/templates/rdtk.pc.in
new file mode 100644
index 0000000..aed9f3b
--- /dev/null
+++ b/rdtk/templates/rdtk.pc.in
@@ -0,0 +1,15 @@
+prefix=@PKG_CONFIG_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
+includedir=${prefix}/@RDTK_INCLUDE_DIR@
+libs=-lrdtk@RDTK_VERSION_MAJOR@
+
+Name: rdtk@RDTK_API_VERSION@
+Description: rdtk:
+URL: http://www.freerdp.com/
+Version: @RDTK_VERSION@
+Requires:
+Requires.private: winpr@WINPR_VERSION_MAJOR@
+Libs: -L${libdir} ${libs}
+Libs.private:
+Cflags: -I${includedir}
diff --git a/rdtk/templates/rdtkConfig.cmake.in b/rdtk/templates/rdtkConfig.cmake.in
new file mode 100644
index 0000000..230e92c
--- /dev/null
+++ b/rdtk/templates/rdtkConfig.cmake.in
@@ -0,0 +1,9 @@
+@PACKAGE_INIT@
+
+set(RDTK_VERSION_MAJOR "@RDTK_VERSION_MAJOR@")
+set(RDTK_VERSION_MINOR "@RDTK_VERSION_MINOR@")
+set(RDTK_VERSION_REVISION "@RDTK_VERSION_REVISION@")
+
+set_and_check(RDTK_INCLUDE_DIR "@PACKAGE_RDTK_INCLUDE_DIR@")
+
+include("${CMAKE_CURRENT_LIST_DIR}/rdtk.cmake")
diff --git a/rdtk/templates/version.h.in b/rdtk/templates/version.h.in
new file mode 100644
index 0000000..d1fd200
--- /dev/null
+++ b/rdtk/templates/version.h.in
@@ -0,0 +1,32 @@
+/**
+ * FreeRDP: A Remote Desktop Protocol Implementation
+ * Version includes
+ *
+ * Copyright 2021 Thincast Technologies GmbH
+ * Copyright 2021 Armin Novak <armin.novak@thincast.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef RDTK_VERSION_H
+#define RDTK_VERSION_H
+
+#define RDTK_VERSION_MAJOR ${RDTK_VERSION_MAJOR}
+#define RDTK_VERSION_MINOR ${RDTK_VERSION_MINOR}
+#define RDTK_VERSION_REVISION ${RDTK_VERSION_REVISION}
+#define RDTK_VERSION_SUFFIX "${RDTK_VERSION_SUFFIX}"
+#define RDTK_API_VERSION "${RDTK_API_VERSION}"
+#define RDTK_VERSION "${RDTK_VERSION}"
+#define RDTK_VERSION_FULL "${RDTK_VERSION_FULL}"
+#define RDTK_GIT_REVISION "${GIT_REVISION}"
+
+#endif /* RDTK_VERSION_H */