Followers 0

# RelWithDebInfo output directory

## 1 post in this topic

Hi all,

I use CMake to generate the project, all works fine but when I compile using RelWithDebInfo I don't have the good output dir.

Here is the script I use to set the output directories :

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_SOURCE_DIR}/bin) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE${CMAKE_CURRENT_SOURCE_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_SOURCE_DIR}/lib) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE${CMAKE_CURRENT_SOURCE_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_SOURCE_DIR}/lib) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE${CMAKE_CURRENT_SOURCE_DIR}/lib)
set(CMAKE_DEBUG_POSTFIX "_Debug")

As you can see, what I want is to output the lib into "lib/".
This issue only happen on RelWithDebInfo, on Debug and Release no problem.
Thanks for the help
0

##### Share on other sites

Have you tried something like CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO? I don't have CMake available right now so I can't test it, but I found a couple of projects on github that use it.

0

## Create an account

Register a new account