Skip to content

Commit

Permalink
cmake: Add options to disable usage of distribution's libraries
Browse files Browse the repository at this point in the history
This adds two new options to the cmake script which, when set, force
cmake to use the version of the Antlr or QScintilla library in our
repository and not search for a system-wide version of the library.

See issue sqlitebrowser#961.
  • Loading branch information
MKleusberg committed Feb 15, 2017
1 parent b5345fe commit 8533433
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ cmake_minimum_required(VERSION 2.8.7)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}")

OPTION(ENABLE_TESTING "Enable the unit tests" OFF)
OPTION(FORCE_INTERNAL_ANTLR "Don't use the distribution's Antlr library even if there is one" OFF)
OPTION(FORCE_INTERNAL_QSCINTILLA "Don't use the distribution's QScintilla library even if there is one" OFF)

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
Expand Down Expand Up @@ -44,8 +46,12 @@ if(WIN32 AND MSVC)
set(VSREDIST_DIR "C:/dev/dependencies")
endif()

find_package(Antlr2)
find_package(QScintilla)
if(NOT FORCE_INTERNAL_ANTLR)
find_package(Antlr2)
endif()
if(NOT FORCE_INTERNAL_QSCINTILLA)
find_package(QScintilla)
endif()

set(QHEXEDIT_DIR libs/qhexedit)
set(QCUSTOMPLOT_DIR libs/qcustomplot-source)
Expand Down

0 comments on commit 8533433

Please sign in to comment.