Skip to content

Commit 8f8eee6

Browse files
committed
Simplify CMake for shared libs
1 parent 14cba69 commit 8f8eee6

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

CMakeLists.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ endif (SQLITE_USE_LEGACY_STRUCT)
216216
if(BUILD_SHARED_LIBS)
217217
if(WIN32)
218218
add_definitions("-DSQLITECPP_COMPILE_DLL")
219-
target_compile_definitions(SQLiteCpp PRIVATE "SQLITECPP_DLL_EXPORT=1")
219+
target_compile_definitions(SQLiteCpp PRIVATE "SQLITECPP_DLL_EXPORT")
220220
endif()
221221
endif()
222222

@@ -412,11 +412,7 @@ if (SQLITECPP_BUILD_EXAMPLES)
412412

413413
# add the basic example executable
414414
add_executable(SQLiteCpp_example1 ${SQLITECPP_EXAMPLES})
415-
if(BUILD_SHARED_LIBS)
416-
if(WIN32)
417-
target_compile_definitions(SQLiteCpp_example1 PRIVATE "SQLITECPP_DLL_EXPORT=0")
418-
endif()
419-
endif()
415+
420416
target_link_libraries(SQLiteCpp_example1 SQLiteCpp)
421417
if (MSYS OR MINGW)
422418
target_link_libraries(SQLiteCpp_example1 ssp)

0 commit comments

Comments
 (0)