CMake Shared or Static library based on Configuration type
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement