aboutsummaryrefslogtreecommitdiff
path: root/src/common/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/CMakeLists.txt')
-rw-r--r--src/common/CMakeLists.txt14
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})