From a0161a12ac78598a3ad30798e1faf660dd8a9f93 Mon Sep 17 00:00:00 2001 From: Bernhard Miklautz Date: Wed, 6 Nov 2013 17:29:33 +0100 Subject: [PATCH 1/2] moved version information to freerdp/version.h fixed #1465 --- .gitignore | 1 + CMakeLists.txt | 1 + client/common/cmdline.c | 1 + config.h.in | 9 --------- include/CMakeLists.txt | 2 ++ include/freerdp/version.h.in | 32 ++++++++++++++++++++++++++++++++ libfreerdp/core/freerdp.c | 1 + 7 files changed, 38 insertions(+), 9 deletions(-) create mode 100644 include/freerdp/version.h.in diff --git a/.gitignore b/.gitignore index e56bbf257..cc98e1a28 100755 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ _CPack_Packages LICENSE.txt external/* !external/README +include/freerdp/version.h *.a.objlist.cmake *.a.objlist diff --git a/CMakeLists.txt b/CMakeLists.txt index a5052f103..05af4336d 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -462,6 +462,7 @@ set(FREERDP_EXTENSION_PATH "${CMAKE_INSTALL_FULL_LIBDIR}/freerdp/extensions") # Include directories include_directories(${CMAKE_CURRENT_BINARY_DIR}) +include_directories(${CMAKE_CURRENT_BINARY_DIR}/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) # Configure files diff --git a/client/common/cmdline.c b/client/common/cmdline.c index 19ea41010..5d4365a33 100644 --- a/client/common/cmdline.c +++ b/client/common/cmdline.c @@ -33,6 +33,7 @@ #include #include +#include #include "compatibility.h" diff --git a/config.h.in b/config.h.in index d1eac49c1..839ec0da0 100755 --- a/config.h.in +++ b/config.h.in @@ -1,15 +1,6 @@ #ifndef __CONFIG_H #define __CONFIG_H -#define FREERDP_VERSION_MAJOR ${FREERDP_VERSION_MAJOR} -#define FREERDP_VERSION_MINOR ${FREERDP_VERSION_MINOR} -#define FREERDP_VERSION_REVISION ${FREERDP_VERSION_REVISION} -#define FREERDP_VERSION_SUFFIX "${FREERDP_VERSION_SUFFIX}" -#define FREERDP_API_VERSION "${FREERDP_API_VERSION}" -#define FREERDP_VERSION "${FREERDP_VERSION}" -#define FREERDP_VERSION_FULL "${FREERDP_VERSION_FULL}" -#define GIT_REVISION "${GIT_REVISION}" - #define FREERDP_DATA_PATH "${FREERDP_DATA_PATH}" #define FREERDP_KEYMAP_PATH "${FREERDP_KEYMAP_PATH}" #define FREERDP_PLUGIN_PATH "${FREERDP_PLUGIN_PATH}" diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index ec64d17ac..033a46349 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -17,6 +17,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/freerdp/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/freerdp/version.h) + file(GLOB FREERDP_HEADERS "freerdp/*.h") install(FILES ${FREERDP_HEADERS} DESTINATION include/freerdp COMPONENT headers) diff --git a/include/freerdp/version.h.in b/include/freerdp/version.h.in new file mode 100644 index 000000000..e16fd0ce6 --- /dev/null +++ b/include/freerdp/version.h.in @@ -0,0 +1,32 @@ +/** + * FreeRDP: A Remote Desktop Protocol Implementation + * Version includes + * + * Copyright 2013 Thinstuff Technologies GmbH + * Copyright 2013 Bernhard Miklautz + * + * 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 _FREERDP_VERSION_H_ +#define _FREERDP_VERSION_H_ + +#define FREERDP_VERSION_MAJOR ${FREERDP_VERSION_MAJOR} +#define FREERDP_VERSION_MINOR ${FREERDP_VERSION_MINOR} +#define FREERDP_VERSION_REVISION ${FREERDP_VERSION_REVISION} +#define FREERDP_VERSION_SUFFIX "${FREERDP_VERSION_SUFFIX}" +#define FREERDP_API_VERSION "${FREERDP_API_VERSION}" +#define FREERDP_VERSION "${FREERDP_VERSION}" +#define FREERDP_VERSION_FULL "${FREERDP_VERSION_FULL}" +#define GIT_REVISION "${GIT_REVISION}" + +#endif // _FREERDP_VERSION_H_ diff --git a/libfreerdp/core/freerdp.c b/libfreerdp/core/freerdp.c index b0b865180..852743bac 100644 --- a/libfreerdp/core/freerdp.c +++ b/libfreerdp/core/freerdp.c @@ -39,6 +39,7 @@ #include #include #include +#include /* connectErrorCode is 'extern' in error.h. See comment there.*/ From c9f49162bd1dbc170cbb068f14e17deb43434941 Mon Sep 17 00:00:00 2001 From: Bernhard Miklautz Date: Wed, 6 Nov 2013 17:44:17 +0100 Subject: [PATCH 2/2] install version.h --- include/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 033a46349..5e06eaa0f 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -21,6 +21,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/freerdp/version.h.in ${CMAKE_CURRENT_ file(GLOB FREERDP_HEADERS "freerdp/*.h") install(FILES ${FREERDP_HEADERS} DESTINATION include/freerdp COMPONENT headers) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/freerdp/version.h DESTINATION include/freerdp COMPONENT headers) install(DIRECTORY freerdp/cache DESTINATION include/freerdp COMPONENT headers FILES_MATCHING PATTERN "*.h") install(DIRECTORY freerdp/codec DESTINATION include/freerdp COMPONENT headers FILES_MATCHING PATTERN "*.h")