Re: [CMake] IMPORTED DLL-only Target on MSVC
> -Ursprüngliche Nachricht- > Von: CMake [mailto:cmake-boun...@cmake.org] Im Auftrag von Marek > Vojtko (Firaxis) > Gesendet: Dienstag, 3. April 2018 00:49 > An: cmake@cmake.org > Betreff: [CMake] IMPORTED DLL-only Target on MSVC > > Hi, > > Is it not possible to wrap an external DLL-only library in an IMPORTED target? > Yes it is. > I have an external dependency that is a single DLL (shared library) and a > header file, but no LIB (static library) file. When I create an IMPORTED > target How does this work in Visual Studio C++? If I am not completely mistaken you ALWAYS need a .lib file along with your .dll to link to the shared library. And you Need a header with the API as well of course. The only case I know with .dll and without .lib file is when you have managed C++ or C# targets. > and depend on it via target_link_libraries() I run into linkage issues, > because > on MSVC CMake puts the DLL into the linker command (the "Input" text field > in the "Linker" settings of the Project Properties). > > add_library( MyDependency::MyDependency MODULE IMPORTED ) > set_target_properties( MyDependency::MyDependency > PROPERTIES > INTERFACE_INCLUDE_DIRECTORIES "${MyDependency_INCLUDE_DIR}" > IMPORTED_LOCATION "${MyDependency_SHARED_LIB}" > ) > [..] > add_executable( MyExecutable ... ) > target_link_libraries( MyExecutable PRIVATE > MyDependency::MyDependency ) > > I tried changing the library type in my add_library() call: > - STATIC obviously didn't work, because I don't have a .lib file and the .dll > file > in IMPORTED_LOCATION was added to MyExecutable's linker line. > - SHARED did not work because CMake expects a .dll in > IMPORTED_LOCATION and a .lib in IMPORTED_IMP_LOCATION, so > MyExecutable's linker line had a MyDependency::MyDependency- > NOTFOUND entry in it. > - MODULE seemed like the right choice when reading the documentation, > but MyExecutable's linker line still contains the .dll file specified in > IMPORTED_LOCATION. > > What am I doing wrong? > > Thanks, > Marek > > -- > > Powered by www.kitware.com > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Kitware offers various services to support the CMake community. For more > information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > https://cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
[Cmake-commits] CMake branch, master, updated. v3.11.0-375-ge3ce4d7
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via e3ce4d7a282ba75a4d34aefb0176535bdbe55c36 (commit) from e42fcb117fa1a8d063023bb39db96da93159ee40 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e3ce4d7a282ba75a4d34aefb0176535bdbe55c36 commit e3ce4d7a282ba75a4d34aefb0176535bdbe55c36 Author: Kitware Robot <kwro...@kitware.com> AuthorDate: Tue Apr 3 00:01:07 2018 -0400 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Tue Apr 3 00:01:07 2018 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index df5dbc2..2798dfe 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 11) -set(CMake_VERSION_PATCH 20180402) +set(CMake_VERSION_PATCH 20180403) #set(CMake_VERSION_RC 1) --- Summary of changes: Source/CMakeVersion.cmake |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org https://cmake.org/mailman/listinfo/cmake-commits
[CMake] IMPORTED DLL-only Target on MSVC
Hi, Is it not possible to wrap an external DLL-only library in an IMPORTED target? I have an external dependency that is a single DLL (shared library) and a header file, but no LIB (static library) file. When I create an IMPORTED target and depend on it via target_link_libraries() I run into linkage issues, because on MSVC CMake puts the DLL into the linker command (the "Input" text field in the "Linker" settings of the Project Properties). add_library( MyDependency::MyDependency MODULE IMPORTED ) set_target_properties( MyDependency::MyDependency PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${MyDependency_INCLUDE_DIR}" IMPORTED_LOCATION "${MyDependency_SHARED_LIB}" ) [..] add_executable( MyExecutable ... ) target_link_libraries( MyExecutable PRIVATE MyDependency::MyDependency ) I tried changing the library type in my add_library() call: - STATIC obviously didn't work, because I don't have a .lib file and the .dll file in IMPORTED_LOCATION was added to MyExecutable's linker line. - SHARED did not work because CMake expects a .dll in IMPORTED_LOCATION and a .lib in IMPORTED_IMP_LOCATION, so MyExecutable's linker line had a MyDependency::MyDependency-NOTFOUND entry in it. - MODULE seemed like the right choice when reading the documentation, but MyExecutable's linker line still contains the .dll file specified in IMPORTED_LOCATION. What am I doing wrong? Thanks, Marek -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
Re: [cmake-developers] iOS friendly CMake
Hi, On 1/16/18 11:19 AM, Gregor Jasny wrote: > I created a CMake branch where I attempt to provide an easy way to > configure CMake projects for iOS (and all other Xcode SDKs). I have a second revision of the patches. Issue: https://gitlab.kitware.com/cmake/cmake/issues/17870 Branch: https://gitlab.kitware.com/gjasny/cmake/commits/17870-iphone-friendly-cmake It would be nice if you could give the branch a try. But please note the list of open todos within the issue. Thanks, Gregor -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake-developers
[Cmake-commits] CMake branch, master, updated. v3.11.0-374-ge42fcb1
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via e42fcb117fa1a8d063023bb39db96da93159ee40 (commit) via eb80af90936a17863d974f0a4257c9b6da62ec84 (commit) via a76e23eabbd21ff4af54755362bead6334b279b7 (commit) via 59713e856d54d9c0b248b8b3badaf46c289180f3 (commit) via df535ad846f5a25cd0795ce099a8604149bbf748 (commit) via e7af91d02684e954596351b02b1dcb3c884b03f2 (commit) via 23119366e9d4e56e13c1fdec9dbff5e8f8c55ee5 (commit) from 8f5b6962c9f43fda7f1c771bb41fd6db92bc4045 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e42fcb117fa1a8d063023bb39db96da93159ee40 commit e42fcb117fa1a8d063023bb39db96da93159ee40 Merge: a76e23e eb80af9 Author: Brad KingAuthorDate: Mon Apr 2 14:09:10 2018 + Commit: Kitware Robot CommitDate: Mon Apr 2 10:09:15 2018 -0400 Merge topic 'remove-vs8-generator' eb80af9093 Drop Visual Studio 8 2005 generator e7af91d026 Tests: Remove unused file from Tutorial Step7 test Acked-by: Kitware Robot Merge-request: !1901 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eb80af90936a17863d974f0a4257c9b6da62ec84 commit eb80af90936a17863d974f0a4257c9b6da62ec84 Author: Brad King AuthorDate: Thu Mar 8 11:30:02 2018 -0500 Commit: Brad King CommitDate: Mon Apr 2 10:08:10 2018 -0400 Drop Visual Studio 8 2005 generator This generator has been deprecated since CMake 3.9. Remove it. diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst index d4f644a..e3fb6b6 100644 --- a/Help/command/add_custom_command.rst +++ b/Help/command/add_custom_command.rst @@ -217,7 +217,7 @@ of the following is specified: ``PRE_BUILD`` Run before any other rules are executed within the target. - This is supported only on Visual Studio 8 or later. + This is supported only on Visual Studio 9 or later. For all other generators ``PRE_BUILD`` will be treated as ``PRE_LINK``. ``PRE_LINK`` diff --git a/Help/generator/Visual Studio 8 2005.rst b/Help/generator/Visual Studio 8 2005.rst index acbbf01..947e7a5 100644 --- a/Help/generator/Visual Studio 8 2005.rst +++ b/Help/generator/Visual Studio 8 2005.rst @@ -1,23 +1,6 @@ Visual Studio 8 2005 -Deprecated. Generates Visual Studio 8 2005 project files. - -.. note:: - This generator is deprecated and will be removed in a future version - of CMake. It will still be possible to build with VS 8 2005 tools - using the :generator:`Visual Studio 10 2010` (or above) generator - with :variable:`CMAKE_GENERATOR_TOOLSET` set to ``v80``, or by - using the :generator:`NMake Makefiles` generator. - -The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set -to specify a target platform name. - -For compatibility with CMake versions prior to 3.1, one may specify -a target platform name optionally at the end of this generator name: - -``Visual Studio 8 2005 Win64`` - Specify target platform ``x64``. - -``Visual Studio 8 2005 `` - Specify target platform matching a Windows CE SDK name. +Removed. This once generated Visual Studio 8 2005 project files, but +the generator has been removed since CMake 3.12. It is still possible to +build with VS 2005 tools using the :generator:`NMake Makefiles` generator. diff --git a/Help/prop_dir/VS_GLOBAL_SECTION_POST_section.rst b/Help/prop_dir/VS_GLOBAL_SECTION_POST_section.rst index a316abe..814bd5f 100644 --- a/Help/prop_dir/VS_GLOBAL_SECTION_POST_section.rst +++ b/Help/prop_dir/VS_GLOBAL_SECTION_POST_section.rst @@ -17,7 +17,7 @@ pairs. Each such pair will be transformed into an entry in the solution global section. Whitespace around key and value is ignored. List elements which do not contain an equal sign are skipped. -This property only works for Visual Studio 8 and above; it is ignored +This property only works for Visual Studio 9 and above; it is ignored on other generators. The property only applies when set on a directory whose CMakeLists.txt contains a project() command. diff --git a/Help/prop_dir/VS_GLOBAL_SECTION_PRE_section.rst b/Help/prop_dir/VS_GLOBAL_SECTION_PRE_section.rst index 200e8e6..f70e9f1 100644 --- a/Help/prop_dir/VS_GLOBAL_SECTION_PRE_section.rst +++ b/Help/prop_dir/VS_GLOBAL_SECTION_PRE_section.rst @@ -17,6 +17,6 @@ pairs. Each such pair will be transformed into an entry in the solution global section. Whitespace around key and value is ignored. List elements which do not contain an equal sign are
[Cmake-commits] CMake branch, master, updated. v3.11.0-367-g8f5b696
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 8f5b6962c9f43fda7f1c771bb41fd6db92bc4045 (commit) via 1b6ec4b9e34a06c047cb41245587673959b5b591 (commit) via 5d5e1e691772ecfd9224be0afe33802f8aee3fc3 (commit) via 4c90e94368b5bda54e8e52bcad228f0d05804316 (commit) via b66f18c84f89360768bf81c15ce0023840600e26 (commit) via a53cf69022e57d859864d59b9c03238f180cb400 (commit) via e62dfeccb1bb6a86a85f34908343a89f6d02ee6a (commit) via c22cdf78d7be7283d7d031c7e9e15246d53354f8 (commit) via 8570dc7f64928ec7896197394f089f5ad063c6ca (commit) via 874d3d294889b4de25cecbca4347f8012199b153 (commit) via 7f295b1bd3c6f4b86ebf3711fa8d76cdaf4f51a5 (commit) via 71cb8ce3a1e1c41ffcd43760609defc574d2a65b (commit) via 8f146c45087bae5869f95cebce84134c917d28bf (commit) via 7fe580a36253281784dda9c35798693350e24859 (commit) via 1b328e09a33e61293635c7ddb9bcff986ae8d1e7 (commit) via 0bc3e5788a669f16383a586fee4684e9a08488dc (commit) from a0b5dade9a494783e7b130e27e1dbc12fa1772c6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8f5b6962c9f43fda7f1c771bb41fd6db92bc4045 commit 8f5b6962c9f43fda7f1c771bb41fd6db92bc4045 Merge: 1b6ec4b 4c90e94 Author: Brad KingAuthorDate: Mon Apr 2 14:01:01 2018 + Commit: Kitware Robot CommitDate: Mon Apr 2 10:03:12 2018 -0400 Merge topic 'update-kwsys' 4c90e94368 Merge branch 'upstream-KWSys' into update-kwsys b66f18c84f KWSys 2018-03-29 (488f2031) Acked-by: Kitware Robot Merge-request: !1902 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1b6ec4b9e34a06c047cb41245587673959b5b591 commit 1b6ec4b9e34a06c047cb41245587673959b5b591 Merge: 5d5e1e6 8570dc7 Author: Brad King AuthorDate: Mon Apr 2 14:00:00 2018 + Commit: Kitware Robot CommitDate: Mon Apr 2 10:01:23 2018 -0400 Merge topic 'features-c++20' 8570dc7f64 Help: Update compiler versions in cmake-compile-features.7.rst 874d3d2948 Help: Add release note for C++ 20 support 7f295b1bd3 Features: Activate C++ 20 support for Clang 5.0+ 71cb8ce3a1 Features: Activate C++ 20 support for GNU 8.0+ 8f146c4508 Features: Activate C++ 20 support for MSVC 19.12.25835+ 7fe580a362 Features: Add infrastructure for C++ 20 language standard 1b328e09a3 Features: Use -std=c++17 for C++ 17 on Clang 5.0+ 0bc3e5788a Features: Use -std=c++17 for C++ 17 on GNU 8.0+ Acked-by: Kitware Robot Merge-request: !1892 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5d5e1e691772ecfd9224be0afe33802f8aee3fc3 commit 5d5e1e691772ecfd9224be0afe33802f8aee3fc3 Merge: a0b5dad a53cf69 Author: Brad King AuthorDate: Mon Apr 2 13:59:50 2018 + Commit: Kitware Robot CommitDate: Mon Apr 2 10:00:20 2018 -0400 Merge topic 'features-msvc-c' a53cf69022 Features: Record C features for MSVC e62dfeccb1 Features: Do not assume c_restrict support in CompileFeatures test c22cdf78d7 Features: Fix CompileFeatures test checks for C Acked-by: Kitware Robot Acked-by: Harry Mallon Merge-request: !1897 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4c90e94368b5bda54e8e52bcad228f0d05804316 commit 4c90e94368b5bda54e8e52bcad228f0d05804316 Merge: 894a41f b66f18c Author: Brad King AuthorDate: Thu Mar 29 11:41:57 2018 -0400 Commit: Brad King CommitDate: Thu Mar 29 11:41:57 2018 -0400 Merge branch 'upstream-KWSys' into update-kwsys * upstream-KWSys: KWSys 2018-03-29 (488f2031) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b66f18c84f89360768bf81c15ce0023840600e26 commit b66f18c84f89360768bf81c15ce0023840600e26 Author: KWSys Upstream AuthorDate: Thu Mar 29 11:41:23 2018 -0400 Commit: Brad King CommitDate: Thu Mar 29 11:41:57 2018 -0400 KWSys 2018-03-29 (488f2031) Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit 488f203157792badb6204be513602d4e83884d21 (master). Upstream Shortlog - Ben Boeckel (1): a3caaeec SystemTools: faster relative path codepath Brad King (1): 805d9a7c Terminal: Add xterm-kitty to VT100 color support whitelist luz.paz (1):