Jump to content
  • Advertisement
Sign in to follow this  

CMake Shared or Static library based on Configuration type

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

Hello, I'm trying to create a CMake script for a library project (SceneEngine) that needs 4 configurations, two that build the project as static libraries (Release and Debug), and two that builds it as shared libraries (ReleaseDLL and DebugDLL). I also need to add some other projects (executable and shared libraries) that use the SceneEngine libraries. The table below shows how the SceneEngine libraries need to be built and how the other projects use the library: _______________________Debug________________DebugDLL_____________Release_____________ReleaseDLL SceneEngine_______SceneEngine.lib___________SceneEngine.dll________SceneEngine.lib_______SceneEngine.dll ________________________________________SceneEngine_dll.lib_________________________SceneEngine_dll.lib _______________________________________________v_________________________________________v CrackArt_______________________________________exe_______________________________________exe __________________________v_________________________________________v ScEngMax_________________dll________________________________________dll CrackArt.exe uses shared SceneEngine.dll (and links to exported SceneEngine_dll.lib). ScEngMax.dll links to static SceneEngine.lib. [Sorry for the weird looking table] My question is, does anybody know how to define the type of library configured by CMake based on the configuration type? Or does anybody know a good place this information, or a project that does something similar? Thank you Diego

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!