Format CMakeLists.txt

This commit is contained in:
Loren Burkholder 2023-09-23 22:29:50 -04:00
parent 03be9e479a
commit 58ac409f31
No known key found for this signature in database
GPG key ID: AB62CB312CEC2BBC

View file

@ -85,7 +85,6 @@ if(${CMAKE_VERSION} VERSION_LESS "3.14.0")
message("Adding FetchContent_MakeAvailable") message("Adding FetchContent_MakeAvailable")
# from cmakes sources # from cmakes sources
macro(FetchContent_MakeAvailable) macro(FetchContent_MakeAvailable)
foreach(contentName IN ITEMS ${ARGV}) foreach(contentName IN ITEMS ${ARGV})
string(TOLOWER ${contentName} contentNameLower) string(TOLOWER ${contentName} contentNameLower)
FetchContent_GetProperties(${contentName}) FetchContent_GetProperties(${contentName})
@ -103,7 +102,6 @@ if(${CMAKE_VERSION} VERSION_LESS "3.14.0")
endif() endif()
endif() endif()
endforeach() endforeach()
endmacro() endmacro()
endif() endif()
@ -169,8 +167,7 @@ else()
if(WIN32) if(WIN32)
pkg_check_modules(libevent_windows REQUIRED IMPORTED_TARGET libevent_windows) pkg_check_modules(libevent_windows REQUIRED IMPORTED_TARGET libevent_windows)
else() else()
pkg_check_modules(libevent_pthreads REQUIRED IMPORTED_TARGET pkg_check_modules(libevent_pthreads REQUIRED IMPORTED_TARGET libevent_pthreads)
libevent_pthreads)
endif() endif()
endif() endif()
@ -225,7 +222,6 @@ else()
pkg_check_modules(re2 REQUIRED IMPORTED_TARGET re2) pkg_check_modules(re2 REQUIRED IMPORTED_TARGET re2)
endif() endif()
# #
# LMDB # LMDB
# #
@ -511,7 +507,6 @@ set(SRC_FILES
include(FeatureSummary) include(FeatureSummary)
if(USE_BUNDLED_OPENSSL) if(USE_BUNDLED_OPENSSL)
hunter_add_package_safe(OpenSSL) hunter_add_package_safe(OpenSSL)
endif() endif()
@ -587,7 +582,6 @@ else()
/usr/local/include /usr/local/include
$ENV{LIB_DIR}/include $ENV{LIB_DIR}/include
$ENV{LIB_DIR}/include/lmdbxx) $ENV{LIB_DIR}/include/lmdbxx)
endif() endif()
add_library(lmdbxx INTERFACE) add_library(lmdbxx INTERFACE)
target_include_directories(lmdbxx INTERFACE ${LMDBXX_INCLUDE_DIR}) target_include_directories(lmdbxx INTERFACE ${LMDBXX_INCLUDE_DIR})
@ -816,7 +810,6 @@ qt_add_qml_module(nheko
# #PREFIX "/" # #PREFIX "/"
#) #)
# #
# Bundle translations # Bundle translations
# #
@ -824,7 +817,6 @@ file(GLOB LANG_TS_SRC "${CMAKE_CURRENT_SOURCE_DIR}/resources/langs/*.ts")
qt_add_translations(nheko RESOURCE_PREFIX "/translations" TS_FILES qt_add_translations(nheko RESOURCE_PREFIX "/translations" TS_FILES
${LANG_TS_SRC} SOURCES ${QML_SOURCES} ${SRC_FILES}) ${LANG_TS_SRC} SOURCES ${QML_SOURCES} ${SRC_FILES})
if(WIN32) if(WIN32)
target_compile_definitions(nheko PRIVATE WIN32_LEAN_AND_MEAN) target_compile_definitions(nheko PRIVATE WIN32_LEAN_AND_MEAN)
if(MSVC) if(MSVC)
@ -910,12 +902,10 @@ if(MSVC)
target_link_libraries(nheko PRIVATE ntdll) target_link_libraries(nheko PRIVATE ntdll)
endif() endif()
if(QML_DEBUGGING) if(QML_DEBUGGING)
target_compile_definitions(nheko PRIVATE QML_DEBUGGING) target_compile_definitions(nheko PRIVATE QML_DEBUGGING)
endif() endif()
if(NOT MSVC AND NOT HAIKU) if(NOT MSVC AND NOT HAIKU)
if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR CI_BUILD) if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR CI_BUILD)
target_compile_options(nheko PRIVATE "-Werror") target_compile_options(nheko PRIVATE "-Werror")