diff options
author | Naios <naios-dev@live.de> | 2016-03-22 19:58:32 +0100 |
---|---|---|
committer | Naios <naios-dev@live.de> | 2016-03-24 01:28:58 +0100 |
commit | 501fd9b50232ca3ae3623877c3e521c9c1f894be (patch) | |
tree | 073a16994f31aa1ebc28e87b0e9427540f48340a /src/common/CMakeLists.txt | |
parent | 183f97005573f499d486613119e7bbb3d5d5318b (diff) |
Core/Common: Converted the common library to a shared library.
* There is still the possibility to static link against common.
Diffstat (limited to 'src/common/CMakeLists.txt')
-rw-r--r-- | src/common/CMakeLists.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 6f13dc821a9..4250df6d1f1 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -30,6 +30,8 @@ endif (USE_COREPCH) GroupSources(${CMAKE_CURRENT_SOURCE_DIR}) +add_definitions(-DTRINITY_API_EXPORT_COMMON) + add_library(common ${PRIVATE_SOURCES} ${PRIVATE_PCH_SOURCE} @@ -78,6 +80,18 @@ set_target_properties(common FOLDER "server") +if( BUILD_SHARED_LIBS ) + if( UNIX ) + install(TARGETS common + LIBRARY + DESTINATION lib) + elseif( WIN32 ) + install(TARGETS common + RUNTIME + DESTINATION "${CMAKE_INSTALL_PREFIX}") + endif() +endif() + # Generate precompiled header if (USE_COREPCH) add_cxx_pch(common ${PRIVATE_PCH_HEADER} ${PRIVATE_PCH_SOURCE}) |