mirror of
				https://github.com/Telecominfraproject/wlan-cloud-lib-poco.git
				synced 2025-10-30 18:17:50 +00:00 
			
		
		
		
	include version resource in DLLs built with CMake
This commit is contained in:
		| @@ -6,6 +6,12 @@ POCO_SOURCES_AUTO( SRCS ${SRCS_G}) | ||||
| file(GLOB_RECURSE HDRS_G "include/*.h" ) | ||||
| POCO_HEADERS_AUTO( SRCS ${HDRS_G}) | ||||
|  | ||||
| # Version Resource | ||||
| if(MSVC AND NOT POCO_STATIC) | ||||
|     source_group("Resources" FILES ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
|     list(APPEND SRCS ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
| endif() | ||||
|  | ||||
| add_library(CppParser ${SRCS}) | ||||
| add_library(Poco::CppParser ALIAS CppParser) | ||||
| set_target_properties(CppParser | ||||
|   | ||||
| @@ -6,6 +6,12 @@ POCO_SOURCES_AUTO( SRCS ${SRCS_G}) | ||||
| file(GLOB_RECURSE HDRS_G "include/*.h" ) | ||||
| POCO_HEADERS_AUTO( SRCS ${HDRS_G}) | ||||
|  | ||||
| # Version Resource | ||||
| if(MSVC AND NOT POCO_STATIC) | ||||
|     source_group("Resources" FILES ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
|     list(APPEND SRCS ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
| endif() | ||||
|  | ||||
| add_library(Crypto ${SRCS} ) | ||||
| add_library(Poco::Crypto ALIAS Crypto) | ||||
| set_target_properties(Crypto | ||||
|   | ||||
| @@ -11,6 +11,11 @@ if(MSVC AND NOT(MSVC_VERSION LESS 1400)) | ||||
|         PROPERTIES COMPILE_FLAGS "/bigobj") | ||||
| endif() | ||||
|  | ||||
| # Version Resource | ||||
| if(MSVC AND NOT POCO_STATIC) | ||||
|     source_group("Resources" FILES ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
|     list(APPEND SRCS ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
| endif() | ||||
|  | ||||
| add_library(Data ${SRCS} ) | ||||
| add_library(Poco::Data ALIAS Data) | ||||
|   | ||||
| @@ -6,6 +6,12 @@ POCO_SOURCES_AUTO( MYSQL_SRCS ${SRCS_G}) | ||||
| file(GLOB_RECURSE HDRS_G "include/*.h" ) | ||||
| POCO_HEADERS_AUTO( MYSQL_SRCS ${HDRS_G}) | ||||
|  | ||||
| # Version Resource | ||||
| if(MSVC AND NOT POCO_STATIC) | ||||
|     source_group("Resources" FILES ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
|     list(APPEND MYSQL_SRCS ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
| endif() | ||||
|  | ||||
| add_library(DataMySQL ${MYSQL_SRCS} ) | ||||
| add_library(Poco::DataMySQL ALIAS DataMySQL) | ||||
| set_target_properties(DataMySQL | ||||
|   | ||||
| @@ -6,6 +6,12 @@ POCO_SOURCES_AUTO( ODBC_SRCS ${SRCS_G}) | ||||
| file(GLOB_RECURSE HDRS_G "include/*.h" ) | ||||
| POCO_HEADERS_AUTO( ODBC_SRCS ${HDRS_G}) | ||||
|  | ||||
| # Version Resource | ||||
| if(MSVC AND NOT POCO_STATIC) | ||||
|     source_group("Resources" FILES ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
|     list(APPEND ODBC_SRCS ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
| endif() | ||||
|  | ||||
| add_library(DataODBC ${ODBC_SRCS}) | ||||
| add_library(Poco::DataODBC ALIAS DataODBC) | ||||
| set_target_properties(DataODBC | ||||
|   | ||||
| @@ -6,6 +6,12 @@ POCO_SOURCES_AUTO( POSTGRESQL_SRCS ${SRCS_G}) | ||||
| file(GLOB_RECURSE HDRS_G "include/*.h" ) | ||||
| POCO_HEADERS_AUTO( POSTGRESQL_SRCS ${HDRS_G}) | ||||
|  | ||||
| # Version Resource | ||||
| if(MSVC AND NOT POCO_STATIC) | ||||
|     source_group("Resources" FILES ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
|     list(APPEND POSTGRESQL_SRCS ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
| endif() | ||||
|  | ||||
| add_library(DataPostgreSQL ${POSTGRESQL_SRCS} ) | ||||
| add_library(Poco::DataPostgreSQL ALIAS DataPostgreSQL) | ||||
| set_target_properties(DataPostgreSQL | ||||
|   | ||||
| @@ -19,6 +19,12 @@ else() | ||||
|     ) | ||||
| endif() | ||||
|  | ||||
| # Version Resource | ||||
| if(MSVC AND NOT POCO_STATIC) | ||||
|     source_group("Resources" FILES ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
|     list(APPEND SQLITE_SRCS ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
| endif() | ||||
|  | ||||
| add_library(DataSQLite ${SQLITE_SRCS} ) | ||||
|  | ||||
| add_library(Poco::DataSQLite ALIAS DataSQLite) | ||||
|   | ||||
| @@ -6,6 +6,12 @@ POCO_SOURCES( SRCS Encodings ${SRCS_G}) | ||||
| file(GLOB_RECURSE HDRS_G "include/*.h" ) | ||||
| POCO_HEADERS( SRCS Encodings ${HDRS_G}) | ||||
|  | ||||
| # Version Resource | ||||
| if(MSVC AND NOT POCO_STATIC) | ||||
|     source_group("Resources" FILES ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
|     list(APPEND SRCS ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
| endif() | ||||
|  | ||||
| add_library(Encodings ${SRCS} ) | ||||
| add_library(Poco::Encodings ALIAS Encodings) | ||||
| set_target_properties(Encodings | ||||
|   | ||||
| @@ -23,6 +23,12 @@ POCO_SOURCES_AUTO_PLAT( SRCS WIN32 | ||||
| 	) | ||||
| endif() | ||||
|  | ||||
| # Version Resource | ||||
| if(MSVC AND NOT POCO_STATIC) | ||||
|     source_group("Resources" FILES ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
|     list(APPEND SRCS ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
| endif() | ||||
|  | ||||
| # Messages | ||||
| POCO_MESSAGES( SRCS Logging src/pocomsg.mc) | ||||
|  | ||||
|   | ||||
| @@ -7,6 +7,12 @@ file(GLOB_RECURSE HDRS_G "include/*.h" ) | ||||
| POCO_HEADERS_AUTO( SRCS ${HDRS_G}) | ||||
| POCO_SOURCES(SRCS pdjson src/pdjson.c) | ||||
|  | ||||
| # Version Resource | ||||
| if(MSVC AND NOT POCO_STATIC) | ||||
|     source_group("Resources" FILES ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
|     list(APPEND SRCS ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
| endif() | ||||
|  | ||||
| add_library(JSON ${SRCS} ) | ||||
| add_library(Poco::JSON ALIAS JSON) | ||||
| set_target_properties(JSON | ||||
|   | ||||
| @@ -6,6 +6,12 @@ POCO_SOURCES_AUTO( SRCS ${SRCS_G}) | ||||
| file(GLOB_RECURSE HDRS_G "include/*.h" ) | ||||
| POCO_HEADERS_AUTO( SRCS ${HDRS_G}) | ||||
|  | ||||
| # Version Resource | ||||
| if(MSVC AND NOT POCO_STATIC) | ||||
|     source_group("Resources" FILES ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
|     list(APPEND SRCS ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
| endif() | ||||
|  | ||||
| add_library(MongoDB ${SRCS} ) | ||||
| add_library(Poco::MongoDB ALIAS MongoDB) | ||||
| set_target_properties(MongoDB | ||||
|   | ||||
| @@ -6,6 +6,12 @@ POCO_SOURCES_AUTO( SRCS ${SRCS_G}) | ||||
| file(GLOB_RECURSE HDRS_G "include/*.h" ) | ||||
| POCO_HEADERS_AUTO( SRCS ${HDRS_G}) | ||||
|  | ||||
| # Version Resource | ||||
| if(MSVC AND NOT POCO_STATIC) | ||||
|     source_group("Resources" FILES ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
|     list(APPEND SRCS ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
| endif() | ||||
|  | ||||
| add_library(Net ${SRCS} ) | ||||
| add_library(Poco::Net ALIAS Net) | ||||
| set_target_properties( Net | ||||
|   | ||||
| @@ -6,6 +6,12 @@ POCO_SOURCES_AUTO( SRCS ${SRCS_G}) | ||||
| file(GLOB_RECURSE HDRS_G "include/*.h" ) | ||||
| POCO_HEADERS_AUTO( SRCS ${HDRS_G}) | ||||
|  | ||||
| # Version Resource | ||||
| if(MSVC AND NOT POCO_STATIC) | ||||
|     source_group("Resources" FILES ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
|     list(APPEND SRCS ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
| endif() | ||||
|  | ||||
| add_library(NetSSL ${SRCS} ) | ||||
| add_library(Poco::NetSSL ALIAS NetSSL) | ||||
| set_target_properties( NetSSL | ||||
|   | ||||
| @@ -6,6 +6,12 @@ POCO_SOURCES_AUTO( SRCS ${SRCS_G}) | ||||
| file(GLOB_RECURSE HDRS_G "include/*.h" ) | ||||
| POCO_HEADERS_AUTO( SRCS ${HDRS_G}) | ||||
|  | ||||
| # Version Resource | ||||
| if(MSVC AND NOT POCO_STATIC) | ||||
|     source_group("Resources" FILES ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
|     list(APPEND SRCS ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
| endif() | ||||
|  | ||||
| add_library(NetSSLWin ${SRCS}) | ||||
| add_library(Poco::NetSSLWin ALIAS NetSSLWin) | ||||
| set_target_properties(NetSSLWin | ||||
|   | ||||
| @@ -113,6 +113,12 @@ POCO_SOURCES( SRCS libpng | ||||
|     src/pngwutil.c | ||||
| ) | ||||
|  | ||||
| # Version Resource | ||||
| if(MSVC AND NOT POCO_STATIC) | ||||
|     source_group("Resources" FILES ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
|     list(APPEND SRCS ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
| endif() | ||||
|  | ||||
| #TODO: Can we put this with the below includes? PRIVAT eg. | ||||
| include_directories( "include/Poco/PDF" ) # zip src | ||||
|  | ||||
|   | ||||
| @@ -6,6 +6,12 @@ POCO_SOURCES_AUTO( SRCS ${SRCS_G}) | ||||
| file(GLOB_RECURSE HDRS_G "include/*.h" ) | ||||
| POCO_HEADERS_AUTO( SRCS ${HDRS_G}) | ||||
|  | ||||
| # Version Resource | ||||
| if(MSVC AND NOT POCO_STATIC) | ||||
|     source_group("Resources" FILES ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
|     list(APPEND SRCS ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
| endif() | ||||
|  | ||||
| add_library(Redis ${SRCS} ) | ||||
| add_library(Poco::Redis ALIAS Redis) | ||||
| set_target_properties(Redis | ||||
|   | ||||
| @@ -47,6 +47,12 @@ POCO_SOURCES( SRCS 7z | ||||
| #    src/XzIn.c | ||||
| ) | ||||
|  | ||||
| # Version Resource | ||||
| if(MSVC AND NOT POCO_STATIC) | ||||
|     source_group("Resources" FILES ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
|     list(APPEND SRCS ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
| endif() | ||||
|  | ||||
| add_library(SevenZip ${SRCS} ) | ||||
| add_library(Poco::SevenZip ALIAS SevenZip) | ||||
| set_target_properties(SevenZip | ||||
|   | ||||
| @@ -6,6 +6,12 @@ POCO_SOURCES_AUTO( SRCS ${SRCS_G}) | ||||
| file(GLOB_RECURSE HDRS_G "include/*.h" ) | ||||
| POCO_HEADERS_AUTO( SRCS ${HDRS_G}) | ||||
|  | ||||
| # Version Resource | ||||
| if(MSVC AND NOT POCO_STATIC) | ||||
|     source_group("Resources" FILES ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
|     list(APPEND SRCS ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
| endif() | ||||
|  | ||||
| POCO_SOURCES_AUTO_PLAT( SRCS WIN32 | ||||
|     src/WinRegistryConfiguration.cpp | ||||
|     src/WinRegistryKey.cpp | ||||
|   | ||||
| @@ -11,6 +11,12 @@ POCO_SOURCES_AUTO( SRCS ${SRCS_G}) | ||||
| file(GLOB_RECURSE HDRS_G "include/*.h" ) | ||||
| POCO_HEADERS_AUTO( SRCS ${HDRS_G}) | ||||
|  | ||||
| # Version Resource | ||||
| if(MSVC AND NOT POCO_STATIC) | ||||
|     source_group("Resources" FILES ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
|     list(APPEND SRCS ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
| endif() | ||||
|  | ||||
| # If POCO_UNBUNDLED is enabled we try to find the required packages | ||||
| # The configuration will fail if the packages are not found | ||||
| if (POCO_UNBUNDLED) | ||||
|   | ||||
| @@ -6,6 +6,12 @@ POCO_SOURCES_AUTO( SRCS ${SRCS_G}) | ||||
| file(GLOB_RECURSE HDRS_G "include/*.h" ) | ||||
| POCO_HEADERS_AUTO( SRCS ${HDRS_G}) | ||||
|  | ||||
| # Version Resource | ||||
| if(MSVC AND NOT POCO_STATIC) | ||||
|     source_group("Resources" FILES ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
|     list(APPEND SRCS ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||||
| endif() | ||||
|  | ||||
| add_library(Zip ${SRCS} ) | ||||
| add_library(Poco::Zip ALIAS Zip) | ||||
| set_target_properties( Zip | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Günter Obiltschnig
					Günter Obiltschnig