Jump to content
  • Advertisement
Sign in to follow this  
Alundra

CMake generate .lib and .exp for an executable

This topic is 1392 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

Hi,

I use cmake and all works fine but when I compile my visual studio project generated by cmake using add_executable I got a folder "Release/" with inside a .lib and a .exp file.

How set CMake to not generate them and only have the .exe ?

Thanks for the help

Edited by Alundra

Share this post


Link to post
Share on other sites
Advertisement

As far as I know you can't. But also, why would you want to? Remember: The build output directory is not an install/package directory.

Share this post


Link to post
Share on other sites

Finally I found a good solution :

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_SOURCE_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_SOURCE_DIR}/bin)
set(CMAKE_DEBUG_POSTFIX "_Debug")

Like that, the .exe is compiled in "bin" folder and in "build" folder I have the visual studio project + the generated .lib + .exp.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!