Jump to content
  • Advertisement
Sign in to follow this  
RetroBilly

CMake LIBRARY_OUTPUT_PATH and EXECUTABLE_OUTPUT_PATH

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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 this post


Link to post
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 this post


Link to post
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.

Share this post


Link to post
Share on other sites

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")


Alright, this appears to work however CMAKE_LIBRARY_OUTPUT_DIRECTORY does not appear to do anything which is very confusing to be since I am building a library?...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!