Closed kim-com closed 4 months ago
Got the same question, I build with cmake -DBUILD_SHARED_LIBS=ON -S ..
You could also try add set(BUILD_SHARED_LIBS ON CACHE INTERNAL "")
before adding SQLiteCpp subdirectory as in example
@tenk28
thank you for replying on me.
I didn't know about BUILD_SHARED_LIBS
, so I change a little bit CMakefile.
SET(BUILD_SHARED_LIBS ON CACHE BOOL "make shared library" FORCE)
...
...
if(BUILD_SHARED_LIBS)
add_library(SQLiteCpp SHARED ${SQLITECPP_SRC} ${SQLITECPP_INC} ${SQLITECPP_DOC} ${SQLITECPP_SCRIPT})
else()
add_library(SQLiteCpp STATIC ${SQLITECPP_SRC} ${SQLITECPP_INC} ${SQLITECPP_DOC} ${SQLITECPP_SCRIPT})
endif()
it can be shared library?
it describe explicity that BUILD_SHARED_LIBS is OFF if BUILD_SHARED_LIBS is on, there are proper excution for making shared library also option of add_library is auto