]> Creatis software - creaImageIO.git/blobdiff - win64/sqlite/CMakeLists.txt
Add sqlite files with cmakefile if future compilation is mandatory
[creaImageIO.git] / win64 / sqlite / CMakeLists.txt
diff --git a/win64/sqlite/CMakeLists.txt b/win64/sqlite/CMakeLists.txt
new file mode 100644 (file)
index 0000000..2aa17fa
--- /dev/null
@@ -0,0 +1,29 @@
+cmake_minimum_required ( VERSION 2.6 FATAL_ERROR )
+
+project ( sqlite3 C )
+
+SET( CMAKE_INSTALL_PREFIX "" )
+
+set ( SOURCES sqlite3.c )
+set ( HEADERS sqlite3.h )
+
+if ( WIN32 )
+  if ( MSVC )
+#    set ( CMAKE_SHARED_LINKER_FLAGS /DEF:sqlite3.def )
+#    set ( SQLITE3_DEF_FILE "${CMAKE_CURRENT_BINARY_DIR}/sqlite3.def" )
+     add_definitions( "-DSQLITE_API=__declspec(dllexport)" )
+  endif ( MSVC )
+endif ( WIN32 )
+
+add_library ( sqlite3 SHARED
+  ${SOURCES}
+  ${HEADERS}
+)
+
+INSTALL ( TARGETS sqlite3
+  RUNTIME DESTINATION bin
+  LIBRARY DESTINATION lib
+  ARCHIVE DESTINATION lib
+)
+
+INSTALL ( FILES sqlite3.h DESTINATION include )