View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013768CMakeCMakepublic2012-12-01 04:222013-05-06 09:32
ReporterJanne Rönkkö 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionno change required 
PlatformWindowsOSWindowsOS VersionWindows 7 Pro
Product VersionCMake 2.8.10.2 
Target VersionFixed in Version 
Summary0013768: set_target_properties For Library Target Has No Effect On Windows
Descriptionset_target_properties does not have any effect on Windows.

See example from the attached file. The example puts the created library into libs directory on Linux.
Steps To ReproduceUnder MSYS
1. tar xf example.tar
2. mkdir build
3. cd build
4. cmake .. -G 'MSYS Makefiles'
5. make

Under CMD
1. # extract example.tar
2. mkdir buid
3. cd build
4. cmake .. -G "NMake Makefiles"
5. nmake

The library is created in the current directory while the set_target_properties sets the LIBRARY_OUTPUT_PATH to libs
Additional InformationTested with NMake Makefiles, MSYS Makefiles and Ninja generators.
TagsNo tags attached.
Attached Filestar file icon example.tar [^] (10,240 bytes) 2012-12-01 04:22

 Relationships

  Notes
(0031799)
Brad King (manager)
2012-12-03 07:35

You also need to set RUNTIME_OUTPUT_DIRECTORY and ARCHIVE_OUTPUT_DIRECTORY to handle the Windows file types. This is by design. Please ask on the mailing list if you need more help.

http://www.cmake.org/cmake/help/v2.8.10/cmake.html#prop_tgt:LIBRARY_OUTPUT_DIRECTORY [^]
http://www.cmake.org/cmake/help/v2.8.10/cmake.html#prop_tgt:RUNTIME_OUTPUT_DIRECTORY [^]
http://www.cmake.org/cmake/help/v2.8.10/cmake.html#prop_tgt:ARCHIVE_OUTPUT_DIRECTORY [^]

"There are three kinds of target files that may be built: archive, library, and runtime. Executables are always treated as runtime targets. Static libraries are always treated as archive targets. Module libraries are always treated as library targets. For non-DLL platforms shared libraries are treated as library targets. For DLL platforms the DLL part of a shared library is treated as a runtime target and the corresponding import library is treated as an archive target. All Windows-based systems including Cygwin are DLL platforms."
(0032979)
Robert Maynard (manager)
2013-05-06 09:32

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2012-12-01 04:22 Janne Rönkkö New Issue
2012-12-01 04:22 Janne Rönkkö File Added: example.tar
2012-12-03 07:35 Brad King Note Added: 0031799
2012-12-03 07:35 Brad King Status new => resolved
2012-12-03 07:35 Brad King Resolution open => no change required
2013-05-06 09:32 Robert Maynard Note Added: 0032979
2013-05-06 09:32 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team