1
0
forked from blue/squawk

build: reformat cmake code

This commit is contained in:
vae 2021-05-11 22:24:55 +03:00
parent 7d2688151c
commit a184ecafa3
Signed by untrusted user: vae
GPG Key ID: A9A33351400E00E5
2 changed files with 29 additions and 29 deletions

View File

@ -30,17 +30,17 @@ if (SYSTEM_QXMPP)
if (NOT QXmpp_FOUND) if (NOT QXmpp_FOUND)
set(SYSTEM_QXMPP OFF) set(SYSTEM_QXMPP OFF)
message("QXmpp package wasn't found, trying to build with bundled QXmpp") message("QXmpp package wasn't found, trying to build with bundled QXmpp")
else() else ()
message("Building with system QXmpp") message("Building with system QXmpp")
endif() endif ()
endif() endif ()
if(NOT SYSTEM_QXMPP) if (NOT SYSTEM_QXMPP)
target_link_libraries(squawk PRIVATE qxmpp) target_link_libraries(squawk PRIVATE qxmpp)
add_subdirectory(external/qxmpp) add_subdirectory(external/qxmpp)
else() else ()
target_link_libraries(squawk PRIVATE QXmpp::QXmpp) target_link_libraries(squawk PRIVATE QXmpp::QXmpp)
endif() endif ()
## KIO ## KIO
if (WITH_KIO) if (WITH_KIO)
@ -49,11 +49,11 @@ if (WITH_KIO)
if (NOT KF5KIO_FOUND) if (NOT KF5KIO_FOUND)
set(WITH_KIO OFF) set(WITH_KIO OFF)
message("KIO package wasn't found, KIO support modules wouldn't be built") message("KIO package wasn't found, KIO support modules wouldn't be built")
else() else ()
target_compile_definitions(squawk PRIVATE WITH_KIO) target_compile_definitions(squawk PRIVATE WITH_KIO)
message("Building with support of KIO") message("Building with support of KIO")
endif() endif ()
endif() endif ()
## KWallet ## KWallet
if (WITH_KWALLET) if (WITH_KWALLET)
@ -62,11 +62,11 @@ if (WITH_KWALLET)
if (NOT KF5Wallet_FOUND) if (NOT KF5Wallet_FOUND)
set(WITH_KWALLET OFF) set(WITH_KWALLET OFF)
message("KWallet package wasn't found, KWallet support module wouldn't be built") message("KWallet package wasn't found, KWallet support module wouldn't be built")
else() else ()
target_compile_definitions(squawk PRIVATE WITH_KWALLET) target_compile_definitions(squawk PRIVATE WITH_KWALLET)
message("Building with support of KWallet") message("Building with support of KWallet")
endif() endif ()
endif() endif ()
## Signal (TODO) ## Signal (TODO)
# find_package(Signal REQUIRED) # find_package(Signal REQUIRED)
@ -81,9 +81,9 @@ target_link_libraries(squawk PRIVATE simpleCrypt)
target_link_libraries(squawk PRIVATE uuid) target_link_libraries(squawk PRIVATE uuid)
# Build type # Build type
if(NOT CMAKE_BUILD_TYPE) if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug) set(CMAKE_BUILD_TYPE Debug)
endif() endif ()
message("Build type: ${CMAKE_BUILD_TYPE}") message("Build type: ${CMAKE_BUILD_TYPE}")
@ -91,7 +91,7 @@ target_compile_options(squawk PRIVATE
"-Wall;-Wextra" "-Wall;-Wextra"
"$<$<CONFIG:DEBUG>:-g>" "$<$<CONFIG:DEBUG>:-g>"
"$<$<CONFIG:RELEASE>:-O3>" "$<$<CONFIG:RELEASE>:-O3>"
) )
add_subdirectory(core) add_subdirectory(core)
add_subdirectory(external/simpleCrypt) add_subdirectory(external/simpleCrypt)

View File

@ -21,27 +21,27 @@
# LMDB_INCLUDE_DIRS The location of LMDB headers. # LMDB_INCLUDE_DIRS The location of LMDB headers.
find_path(LMDB_ROOT_DIR find_path(LMDB_ROOT_DIR
NAMES include/lmdb.h NAMES include/lmdb.h
) )
find_library(LMDB_LIBRARIES find_library(LMDB_LIBRARIES
NAMES lmdb NAMES lmdb
HINTS ${LMDB_ROOT_DIR}/lib HINTS ${LMDB_ROOT_DIR}/lib
) )
find_path(LMDB_INCLUDE_DIRS find_path(LMDB_INCLUDE_DIRS
NAMES lmdb.h NAMES lmdb.h
HINTS ${LMDB_ROOT_DIR}/include HINTS ${LMDB_ROOT_DIR}/include
) )
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LMDB DEFAULT_MSG find_package_handle_standard_args(LMDB DEFAULT_MSG
LMDB_LIBRARIES LMDB_LIBRARIES
LMDB_INCLUDE_DIRS LMDB_INCLUDE_DIRS
) )
mark_as_advanced( mark_as_advanced(
LMDB_ROOT_DIR LMDB_ROOT_DIR
LMDB_LIBRARIES LMDB_LIBRARIES
LMDB_INCLUDE_DIRS LMDB_INCLUDE_DIRS
) )