This repository has been archived by the owner on Oct 17, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust CMakeLists to make dependency downloading optional
- Loading branch information
Showing
7 changed files
with
127 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \ | ||
-Wall \ | ||
-Wextra \ | ||
-Werror \ | ||
-pipe \ | ||
-pedantic \ | ||
-Wunreachable-code") | ||
|
||
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") | ||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) | ||
|
||
if (GCC_VERSION VERSION_GREATER 4.9) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always" ) | ||
endif() | ||
endif() | ||
|
||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always" ) | ||
endif() | ||
endif() | ||
|
||
if(NOT APPLE AND NOT MSVC) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# | ||
# Find the lmdb library & include dir. | ||
# Build lmdb on Appveyor. | ||
# | ||
|
||
if(APPVEYOR_BUILD) | ||
set(LMDB_VERSION "LMDB_0.9.21") | ||
set(NTDLIB "C:/WINDDK/7600.16385.1/lib/win7/amd64/ntdll.lib") | ||
|
||
execute_process( | ||
COMMAND git clone --depth=1 --branch ${LMDB_VERSION} https://github.com/LMDB/lmdb) | ||
|
||
set(LMDB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/lmdb/libraries/liblmdb) | ||
|
||
add_library(lmdb | ||
${CMAKE_SOURCE_DIR}/lmdb/libraries/liblmdb/lmdb.h | ||
${CMAKE_SOURCE_DIR}/lmdb/libraries/liblmdb/mdb.c | ||
${CMAKE_SOURCE_DIR}/lmdb/libraries/liblmdb/midl.h | ||
${CMAKE_SOURCE_DIR}/lmdb/libraries/liblmdb/midl.c) | ||
|
||
set(LMDB_LIBRARY lmdb) | ||
else() | ||
find_path (LMDB_INCLUDE_DIR NAMES lmdb.h PATHS "$ENV{LMDB_DIR}/include") | ||
find_library (LMDB_LIBRARY NAMES lmdb PATHS "$ENV{LMDB_DIR}/lib" ) | ||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(LMDB DEFAULT_MSG LMDB_INCLUDE_DIR LMDB_LIBRARY) | ||
endif() | ||
|
||
include_directories(${LMDB_INCLUDE_DIR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# | ||
# Generate the translation resource file | ||
# | ||
|
||
FILE(GLOB LANG_TS_SRC "${CMAKE_CURRENT_SOURCE_DIR}/resources/langs/*.ts") | ||
|
||
qt5_add_translation(QM_SRC ${LANG_TS_SRC}) | ||
add_custom_target(LANG_QRC ALL DEPENDS ${QM_SRC}) | ||
|
||
# Generate a qrc file for the translations | ||
set(_qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc) | ||
|
||
if(NOT EXISTS ${_qrc}) | ||
file(WRITE ${_qrc} "<RCC> <qresource prefix=\"/translations\">") | ||
foreach(_lang ${QM_SRC}) | ||
get_filename_component(_filename ${_lang} NAME) | ||
file(APPEND ${_qrc} "<file>${_filename}</file>") | ||
endforeach(_lang) | ||
file(APPEND ${_qrc} "</qresource> </RCC>") | ||
endif() | ||
|
||
qt5_add_resources(LANG_QRC ${_qrc}) | ||
qt5_add_resources(QRC resources/res.qrc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters