• 12
• 10
• 10
• 13
• 10

# CMake LIBRARY_OUTPUT_PATH and EXECUTABLE_OUTPUT_PATH

This topic is 2572 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I set the output paths for my projects using LIBRARY_OUTPUT_PATH and EXECUTABLE_OUTPUT_PATH. When they are generated the output paths in the project files have \Debug or \Release added to them. This is unacceptable because I have DLLs which need to be in the same directory as the binaries. How can I remove the configuration from the end of my output paths?

##### Share on other sites
Hi,
You mean that Your libs are in new folders called Debug and Release?
When You use CMake you can copy those libs from those folders to where your exec is and delete empty folders.
You can do it trough CMake language or even simplier to call shell macro (f.ex. bat file) with such instructions.

##### Share on other sites

Hi,
You mean that Your libs are in new folders called Debug and Release?
When You use CMake you can copy those libs from those folders to where your exec is and delete empty folders.
You can do it trough CMake language or even simplier to call shell macro (f.ex. bat file) with such instructions.

No, the output paths for my projects have the configuration appended to them after I set them in the CMakeList.txt file. I could however add a post build event to copy the files out of the directories using [font=Arial,]ADD_CUSTOM_COMMAND I believe it is but this is not ideal.[/font]

##### Share on other sites
I'v been searching for hours and I can't find anything to fix this. I tried many things and nothing works. The main one I thought would work was this line of code: "set_target_properties(Ovgl PROPERTIES OUTPUT_NAME "..\Ovgl")" but it refuses to accept it as a valid output name. I would have still had empty folders left over but at least it would be in the right folder.

 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "./../lib") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "./../lib") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE "./../lib") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "./../lib") set(CMAKE_DEBUG_POSTFIX "d")