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

View File

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