change defaut value and option logic

This commit is contained in:
Aleksey Dobrunov 2015-09-06 23:00:24 +05:00
parent d04b386fb4
commit 0a04ae2bf6
3 changed files with 3 additions and 3 deletions

View File

@ -84,7 +84,7 @@ ENDIF()
target_link_libraries(g3logger ${PLATFORM_LINK_LIBRIES})
SET(G3LOG_LIBRARY g3logger)
if(ADD_BUILD_SHARED)
if(ADD_BUILD_WIN_SHARED OR NOT(MSVC OR MINGW))
add_library(g3logger_shared SHARED ${SRC_FILES})
set_target_properties(g3logger_shared PROPERTIES LINKER_LANGUAGE CXX)
IF(APPLE)

View File

@ -77,7 +77,7 @@ endif()
#==========================================================================
INCLUDE (${g3log_SOURCE_DIR}/GenerateMacroDefinitionsFile.cmake)
option (ADD_BUILD_SHARED "Build shared library" ON)
option (ADD_BUILD_WIN_SHARED "Build shared library on Windows" OFF)
# =========================================================================
# G3LOG BUILD

View File

@ -69,7 +69,7 @@
#
# Test for Linux, runtime loading of dynamic libraries
#
IF (NOT WIN32 AND NOT ("${CMAKE_CXX_COMPILER_ID}" MATCHES ".*Clang") AND ADD_BUILD_SHARED)
IF (NOT WIN32 AND NOT ("${CMAKE_CXX_COMPILER_ID}" MATCHES ".*Clang"))
add_library(tester_sharedlib SHARED ${DIR_UNIT_TEST}/tester_sharedlib.h ${DIR_UNIT_TEST}/tester_sharedlib.cpp)
target_link_libraries(tester_sharedlib ${G3LOG_SHARED_LIBRARY})