Revert linking ssp in SQLiteCpp and link ssp in the example project for MSYS and MINGW

This commit is contained in:
Ashley Williams 2016-08-30 20:03:41 +01:00
parent 4b4bc3f17a
commit acbad05257

View File

@ -162,9 +162,6 @@ include_directories("${PROJECT_SOURCE_DIR}/include")
# add sources of the wrapper as a "SQLiteCpp" static library # add sources of the wrapper as a "SQLiteCpp" static library
add_library(SQLiteCpp ${SQLITECPP_SRC} ${SQLITECPP_INC} ${SQLITECPP_DOC} ${SQLITECPP_SCRIPT}) add_library(SQLiteCpp ${SQLITECPP_SRC} ${SQLITECPP_INC} ${SQLITECPP_DOC} ${SQLITECPP_SCRIPT})
target_include_directories(SQLiteCpp PUBLIC "${PROJECT_SOURCE_DIR}/include") target_include_directories(SQLiteCpp PUBLIC "${PROJECT_SOURCE_DIR}/include")
if (NOT MSVC)
target_link_libraries(SQLiteCpp libssp)
endif (NOT MSVC)
if (UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")) if (UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang"))
set_target_properties(SQLiteCpp PROPERTIES COMPILE_FLAGS "-fPIC") set_target_properties(SQLiteCpp PROPERTIES COMPILE_FLAGS "-fPIC")
@ -242,6 +239,8 @@ if (SQLITECPP_BUILD_EXAMPLES)
if (NOT APPLE) if (NOT APPLE)
target_link_libraries(SQLiteCpp_example1 dl) target_link_libraries(SQLiteCpp_example1 dl)
endif () endif ()
elseif (MSYS OR MINGW)
target_link_libraries(SQLiteCpp_example1 ssp)
endif () endif ()
else (SQLITECPP_BUILD_EXAMPLES) else (SQLITECPP_BUILD_EXAMPLES)
message(STATUS "SQLITECPP_BUILD_EXAMPLES OFF") message(STATUS "SQLITECPP_BUILD_EXAMPLES OFF")