Skip to content

Commit

Permalink
Provides the ability to define SQLITE3SRCDIR
Browse files Browse the repository at this point in the history
The sources of SQLITE3 will be compiled instead of to use the system
libraries.
  • Loading branch information
Cerri authored and Cerri committed Jul 18, 2016
1 parent 3091f0c commit 38014df
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
19 changes: 17 additions & 2 deletions Source/WebCore/PlatformQt.cmake
Expand Up @@ -147,6 +147,23 @@ list(APPEND WebCore_SOURCES
platform/text/qt/TextBreakIteratorInternalICUQt.cpp
)

if (SQLITE3SRCDIR)

This comment has been minimized.

Copy link
@annulen

annulen Jul 18, 2016

Member

SQLITE3SRCDIR was environment variable, I think we should keep it as such. $ENV{SQLITE3SRCDIR} should work

list(APPEND WebCore_INCLUDE_DIRECTORIES
"${SQLITE3SRCDIR}"

This comment has been minimized.

Copy link
@annulen

annulen Jul 18, 2016

Member

Set ${SQLITE_INCLUDE_DIR} instead

)
list(APPEND WebCore_SOURCES
"${SQLITE3SRCDIR}/sqlite3.c"
)
add_definitions(-DSQLITE_CORE -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_COMPLETE)

This comment has been minimized.

Copy link
@annulen

annulen Jul 18, 2016

Member

I think these defines should affect only sqlite3.c - set them via use source file property on this file only, check Makefile to see if they took effect

This comment has been minimized.

Copy link
@annulen

annulen Jul 18, 2016

Member

IIRC there was a macro to add properties to one file

else()
list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
${SQLITE_INCLUDE_DIR}
)
list(APPEND WebCore_LIBRARIES
${SQLITE_LIBRARIES}
)
endif()

if (ENABLE_DEVICE_ORIENTATION)
list(APPEND WebCore_SOURCES
platform/qt/DeviceMotionClientQt.cpp
Expand Down Expand Up @@ -193,7 +210,6 @@ list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
${Qt5Network_INCLUDE_DIRS}
${Qt5Sensors_INCLUDE_DIRS}
${Qt5Sql_INCLUDE_DIRS}
${SQLITE_INCLUDE_DIR}

This comment has been minimized.

Copy link
@annulen

annulen Jul 18, 2016

Member

Leave it as is, ${SQLITE_INCLUDE_DIR} and ${SQLITE_LIBRARIES} will be just empty in worst case

${ZLIB_INCLUDE_DIRS}
)

Expand All @@ -206,7 +222,6 @@ list(APPEND WebCore_LIBRARIES
${Qt5Network_LIBRARIES}
${Qt5Sensors_LIBRARIES}
${Qt5Sql_LIBRARIES}
${SQLITE_LIBRARIES}
${ZLIB_LIBRARIES}
)

Expand Down
7 changes: 6 additions & 1 deletion Source/cmake/OptionsQt.cmake
Expand Up @@ -172,7 +172,12 @@ endif ()
find_package(LibXml2 2.8.0 REQUIRED)
find_package(JPEG REQUIRED)
find_package(PNG REQUIRED)
find_package(Sqlite REQUIRED)
if ((NOT SQLITE3SRCDIR) OR (NOT EXISTS ${SQLITE3SRCDIR}/sqlite3.c))
if (SQLITE3SRCDIR)
unset(SQLITE3SRCDIR)
endif()
find_package(Sqlite REQUIRED)
endif()
find_package(ZLIB REQUIRED)
find_package(Threads REQUIRED)

Expand Down

0 comments on commit 38014df

Please sign in to comment.