Mercurial > hg > orthanc
comparison Resources/CMake/SQLiteConfiguration.cmake @ 1475:3a5b8ed2d859
fix for OS X
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 01 Aug 2015 21:21:36 +0200 |
parents | 0a67a502c90f |
children | fbf763bb1fa3 |
comparison
equal
deleted
inserted
replaced
1474:3b68924ffb24 | 1475:3a5b8ed2d859 |
---|---|
1 if (STATIC_BUILD OR NOT USE_SYSTEM_SQLITE) | 1 if (APPLE) |
2 # Under OS X, the binaries must always be linked against the | |
3 # system-wide version of SQLite. Otherwise, if some Orthanc plugin | |
4 # also uses its own version of SQLite (such as orthanc-webviewer), | |
5 # this results in a crash in "sqlite3_mutex_enter(db->mutex);" (the | |
6 # mutex is not initialized), probably because the EXE and the DYNLIB | |
7 # share the same memory location for this mutex. | |
8 set(SQLITE_STATIC OFF) | |
9 | |
10 elseif (STATIC_BUILD OR NOT USE_SYSTEM_SQLITE) | |
11 set(SQLITE_STATIC ON) | |
12 else() | |
13 set(SQLITE_STATIC OFF) | |
14 endif() | |
15 | |
16 | |
17 if (SQLITE_STATIC) | |
2 SET(SQLITE_SOURCES_DIR ${CMAKE_BINARY_DIR}/sqlite-amalgamation-3071300) | 18 SET(SQLITE_SOURCES_DIR ${CMAKE_BINARY_DIR}/sqlite-amalgamation-3071300) |
3 DownloadPackage( | 19 DownloadPackage( |
4 "5fbeff9645ab035a1f580e90b279a16d" | 20 "5fbeff9645ab035a1f580e90b279a16d" |
5 "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/sqlite-amalgamation-3071300.zip" | 21 "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/sqlite-amalgamation-3071300.zip" |
6 "${SQLITE_SOURCES_DIR}") | 22 "${SQLITE_SOURCES_DIR}") |