mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-07 11:16:11 -04:00
Simplify CMake for shared libs
This commit is contained in:
parent
14cba69a33
commit
8f8eee6168
@ -216,7 +216,7 @@ endif (SQLITE_USE_LEGACY_STRUCT)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
if(WIN32)
|
||||
add_definitions("-DSQLITECPP_COMPILE_DLL")
|
||||
target_compile_definitions(SQLiteCpp PRIVATE "SQLITECPP_DLL_EXPORT=1")
|
||||
target_compile_definitions(SQLiteCpp PRIVATE "SQLITECPP_DLL_EXPORT")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -412,11 +412,7 @@ if (SQLITECPP_BUILD_EXAMPLES)
|
||||
|
||||
# add the basic example executable
|
||||
add_executable(SQLiteCpp_example1 ${SQLITECPP_EXAMPLES})
|
||||
if(BUILD_SHARED_LIBS)
|
||||
if(WIN32)
|
||||
target_compile_definitions(SQLiteCpp_example1 PRIVATE "SQLITECPP_DLL_EXPORT=0")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_link_libraries(SQLiteCpp_example1 SQLiteCpp)
|
||||
if (MSYS OR MINGW)
|
||||
target_link_libraries(SQLiteCpp_example1 ssp)
|
||||
|
Loading…
x
Reference in New Issue
Block a user