Skip to content
This repository

VS Launcher with different RUNTIME_LIBRARY_DIR's per configuration #11

Open
ulrichard opened this Issue · 2 comments

2 participants

Richard Jesper Hellesø Hansen
Richard

First, thanks a lot for sharing your cmake modules. Especially CreateLaunchers.cmake is really helpful.
But here comes the problem: Some of the dll's have the same name for debug and release builds, but are in different directories. So it would be really cool to be able to write this:

create_target_launcher(myprog
ARGS "/config Default_3D"
RUNTIME_LIBRARIES_Debug ${PL_RUNTIME_DIRS_DEBUG}

RUNTIME_LIBRARIES_Release ${PL_RUNTIME_DIRS_RELEASE}

RUNTIME_LIBRARIES_RelWithDebInfo ${PL_RUNTIME_DIRS_RELEASE}

RUNTIME_LIBRARIES_MinSizeRel ${PL_RUNTIME_DIRS_RELEASE}
WORKING_DIRECTORY ${PROJECT_MAIN_DIR}/App/bin
)

I'm not sure if it's easier to try to emulate it with the ENVIRONMENT option and the VS variable $(ConfigurationName), or if it's easier to modify the cmake code.
What do you think?

Jesper Hellesø Hansen

Hi

I found a workaround for this issue. I only need it for working_directory, so that i can specify the destination to be the output folder of the executable. I use it as follows:
create_target_launcher(TestTarget WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/@USERFILE_CONFIGNAME@").
This variable gets replaced with Debug/Release/RelWithDebInfo/MinSizeRel.

In your case, you would have to follow the same naming for your RUNTIME_LIBRARIES, you could perhaps symlink RelWithDebInfo and MinSizeRel to point to Release?

Richard

Hi jesperhh,

Thanks for your suggestion.

The two PL_RUNTIME_DIRS_* variables contain more than ten directories from 3rd party libraries.
We try to keep the directory structure as close to the original as we can to simplify upgrading.
And we keep the libs in a mercurial repo, so I don't know how that would handle symlinks.
So, I don't see how I could solve my problem with your workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.