diff --git a/CppParser/CMakeLists.txt b/CppParser/CMakeLists.txt index 1dac483e2..39fe41b09 100644 --- a/CppParser/CMakeLists.txt +++ b/CppParser/CMakeLists.txt @@ -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 diff --git a/Crypto/CMakeLists.txt b/Crypto/CMakeLists.txt index 555e141fc..34161a426 100644 --- a/Crypto/CMakeLists.txt +++ b/Crypto/CMakeLists.txt @@ -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 diff --git a/Encodings/CMakeLists.txt b/Encodings/CMakeLists.txt index a2cda4ccb..e8fe5c833 100644 --- a/Encodings/CMakeLists.txt +++ b/Encodings/CMakeLists.txt @@ -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 ${LIB_MODE} ${SRCS} ) add_library(Poco::Encodings ALIAS Encodings) set_target_properties(Encodings diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt index 6a31fe106..69110f5d3 100644 --- a/Foundation/CMakeLists.txt +++ b/Foundation/CMakeLists.txt @@ -26,6 +26,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) diff --git a/JSON/CMakeLists.txt b/JSON/CMakeLists.txt index 2ab192e59..3491a14d7 100644 --- a/JSON/CMakeLists.txt +++ b/JSON/CMakeLists.txt @@ -7,6 +7,12 @@ POCO_SOURCES(SRCS pdjson src/pdjson.c) 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(JSON ${SRCS} ) add_library(Poco::JSON ALIAS JSON) set_target_properties(JSON diff --git a/MongoDB/CMakeLists.txt b/MongoDB/CMakeLists.txt index b2fd6ec41..98c5572d4 100644 --- a/MongoDB/CMakeLists.txt +++ b/MongoDB/CMakeLists.txt @@ -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 diff --git a/Net/CMakeLists.txt b/Net/CMakeLists.txt index 59c2f55e5..8c09aebd9 100644 --- a/Net/CMakeLists.txt +++ b/Net/CMakeLists.txt @@ -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 @@ -21,7 +27,7 @@ if(WIN32) target_link_libraries(Net PUBLIC "iphlpapi") if(WINCE) target_link_libraries(Net PUBLIC "ws2") - else() + else() target_link_libraries(Net PUBLIC "ws2_32") endif() diff --git a/NetSSL_OpenSSL/CMakeLists.txt b/NetSSL_OpenSSL/CMakeLists.txt index 816e7e5b8..bd2e5df37 100644 --- a/NetSSL_OpenSSL/CMakeLists.txt +++ b/NetSSL_OpenSSL/CMakeLists.txt @@ -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 diff --git a/NetSSL_Win/CMakeLists.txt b/NetSSL_Win/CMakeLists.txt index 5f25e399e..aca8dfabe 100644 --- a/NetSSL_Win/CMakeLists.txt +++ b/NetSSL_Win/CMakeLists.txt @@ -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 diff --git a/PDF/CMakeLists.txt b/PDF/CMakeLists.txt index 90b87df54..a6ade7765 100644 --- a/PDF/CMakeLists.txt +++ b/PDF/CMakeLists.txt @@ -114,6 +114,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 diff --git a/Redis/CMakeLists.txt b/Redis/CMakeLists.txt index e0a018d8e..f5c106a2d 100644 --- a/Redis/CMakeLists.txt +++ b/Redis/CMakeLists.txt @@ -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 diff --git a/SQL/CMakeLists.txt b/SQL/CMakeLists.txt index 414ab4ece..8d825cd39 100644 --- a/SQL/CMakeLists.txt +++ b/SQL/CMakeLists.txt @@ -16,6 +16,12 @@ if(MINGW) PROPERTIES COMPILE_FLAGS "-Wa,-mbig-obj") 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(SQL ${SRCS} ) add_library(Poco::SQL ALIAS SQL) set_target_properties(SQL diff --git a/SQL/MySQL/CMakeLists.txt b/SQL/MySQL/CMakeLists.txt index c13ded57d..de32bca1e 100644 --- a/SQL/MySQL/CMakeLists.txt +++ b/SQL/MySQL/CMakeLists.txt @@ -6,6 +6,11 @@ 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(SQLMySQL ${MYSQL_SRCS} ) add_library(Poco::SQLMySQL ALIAS SQLMySQL) diff --git a/SQL/ODBC/CMakeLists.txt b/SQL/ODBC/CMakeLists.txt index e8e03a8cc..804dab101 100644 --- a/SQL/ODBC/CMakeLists.txt +++ b/SQL/ODBC/CMakeLists.txt @@ -6,6 +6,11 @@ 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(SQLODBC ${ODBC_SRCS} ) add_library(Poco::SQLODBC ALIAS SQLODBC) diff --git a/SQL/PostgreSQL/CMakeLists.txt b/SQL/PostgreSQL/CMakeLists.txt index ce79ea97d..69de16f0d 100644 --- a/SQL/PostgreSQL/CMakeLists.txt +++ b/SQL/PostgreSQL/CMakeLists.txt @@ -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(SQLPostgreSQL ${POSTGRESQL_SRCS} ) add_library(Poco::SQLPostgreSQL ALIAS SQLPostgreSQL) set_target_properties(SQLPostgreSQL diff --git a/SQL/SQLite/CMakeLists.txt b/SQL/SQLite/CMakeLists.txt index 671e344dc..52b657416 100644 --- a/SQL/SQLite/CMakeLists.txt +++ b/SQL/SQLite/CMakeLists.txt @@ -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(SQLSQLite ${SQLITE_SRCS} ) add_library(Poco::SQLSQLite ALIAS SQLSQLite) set_target_properties(SQLSQLite @@ -43,8 +49,8 @@ else() if(WINCE) target_compile_definitions(SQLSQLite PRIVATE SQLITE_MSVC_LOCALTIME_API) endif(WINCE) - target_compile_definitions(SQLSQLite PRIVATE - SQLITE_THREADSAFE=1 + target_compile_definitions(SQLSQLite PRIVATE + SQLITE_THREADSAFE=1 SQLITE_DISABLE_LFS SQLITE_OMIT_UTF16 SQLITE_OMIT_PROGRESS_CALLBACK diff --git a/SevenZip/CMakeLists.txt b/SevenZip/CMakeLists.txt index 95a55ef66..6e427d08c 100644 --- a/SevenZip/CMakeLists.txt +++ b/SevenZip/CMakeLists.txt @@ -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 diff --git a/Util/CMakeLists.txt b/Util/CMakeLists.txt index 379b15479..e77bd8d94 100644 --- a/Util/CMakeLists.txt +++ b/Util/CMakeLists.txt @@ -12,6 +12,12 @@ POCO_SOURCES_AUTO_PLAT( SRCS WIN32 src/WinService.cpp ) +# 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(Util ${SRCS} ) add_library(Poco::Util ALIAS Util) set_target_properties(Util diff --git a/XML/CMakeLists.txt b/XML/CMakeLists.txt index 44933364d..89ca11b2f 100644 --- a/XML/CMakeLists.txt +++ b/XML/CMakeLists.txt @@ -25,6 +25,12 @@ else() ) endif (POCO_UNBUNDLED) +# 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(XML ${SRCS} ) add_library(Poco::XML ALIAS XML) diff --git a/Zip/CMakeLists.txt b/Zip/CMakeLists.txt index 79176d0b5..12ea11395 100644 --- a/Zip/CMakeLists.txt +++ b/Zip/CMakeLists.txt @@ -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