View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014196CMakeCMakepublic2013-06-04 09:132016-06-06 13:37
ReporterRoman80 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionwon't fix 
PlatformOSOS Version
Product VersionCMake 2.8.11 
Target VersionFixed in Version 
Summary0014196: Subdirectories in OUTPUT_NAME doesn't work anymore (VS2010)
DescriptionUnder VS2005 this works, but not in VS2010.

If I want to build my shared libraries under VS2005 I added

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
set_target_properties(MyTargetShared PROPERTIES
                      OUTPUT_NAME "dynamic/MyTargetShared")

which generates the shared library in

${CMAKE_BINARY_DIR}/bin/Release/dynamic/MyTargetShared.dll

The same behavior does not work under VS2010, here the shared library is generated in

${CMAKE_BINARY_DIR}/bin/Release/MyTargetShared.dll

Is there a way to append a directory to the OUTPUT_DIRECTORY of the target?
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0033231)
Brad King (manager)
2013-06-04 09:29

This worked at most by accident in older generators. The OUTPUT_NAME is for file names. Use the RUNTIME_OUTPUT_DIRECTORY property:

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

set on the individual target.

 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
 set_target_properties(MyTargetShared PROPERTIES
                       RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/dynamic")
(0034363)
Robert Maynard (manager)
2013-11-04 09:33

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

 Issue History
Date Modified Username Field Change
2013-06-04 09:13 Roman80 New Issue
2013-06-04 09:29 Brad King Note Added: 0033231
2013-06-04 09:29 Brad King Status new => resolved
2013-06-04 09:29 Brad King Resolution open => won't fix
2013-11-04 09:33 Robert Maynard Note Added: 0034363
2013-11-04 09:33 Robert Maynard Status resolved => closed
2016-06-06 13:37 Brad King View Status private => public


Copyright © 2000 - 2018 MantisBT Team