mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
build-system: make CMakeLists.txt more consistent
We used two different ways to add to the end of a list. Let's stick with the more idiomatic one. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
256f58e723
commit
53e153e6d7
1 changed files with 9 additions and 9 deletions
|
@ -151,7 +151,7 @@ include(cmake_variables_helper)
|
||||||
|
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||||
include_directories(${CMAKE_OSX_SYSROOT}/usr/include/libxml2)
|
include_directories(${CMAKE_OSX_SYSROOT}/usr/include/libxml2)
|
||||||
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -lxml2 -lxslt -lsqlite3)
|
LIST(APPEND SUBSURFACE_LINK_LIBRARIES -lxml2 -lxslt -lsqlite3)
|
||||||
else()
|
else()
|
||||||
pkg_config_library(LIBXML libxml-2.0 REQUIRED)
|
pkg_config_library(LIBXML libxml-2.0 REQUIRED)
|
||||||
pkg_config_library(LIBSQLITE3 sqlite3 REQUIRED)
|
pkg_config_library(LIBSQLITE3 sqlite3 REQUIRED)
|
||||||
|
@ -245,7 +245,7 @@ if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopExecutable")
|
||||||
LIST(APPEND QT_EXTRA_COMPONENTS PrintSupport)
|
LIST(APPEND QT_EXTRA_COMPONENTS PrintSupport)
|
||||||
# Because Qt5WebKitWidgets isn't a part of the "regular" Qt5, we can't get it the normal way
|
# Because Qt5WebKitWidgets isn't a part of the "regular" Qt5, we can't get it the normal way
|
||||||
find_package(Qt5WebKitWidgets REQUIRED)
|
find_package(Qt5WebKitWidgets REQUIRED)
|
||||||
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} Qt5::WebKitWidgets)
|
LIST(APPEND SUBSURFACE_LINK_LIBRARIES Qt5::WebKitWidgets)
|
||||||
endif()
|
endif()
|
||||||
elseif (SUBSURFACE_TARGET_EXECUTABLE MATCHES "MobileExecutable")
|
elseif (SUBSURFACE_TARGET_EXECUTABLE MATCHES "MobileExecutable")
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||||
|
@ -278,18 +278,18 @@ if(ANDROID)
|
||||||
set(NO_USERMANUAL ON)
|
set(NO_USERMANUAL ON)
|
||||||
set(MAKE_TESTS OFF)
|
set(MAKE_TESTS OFF)
|
||||||
list(APPEND QT_EXTRA_COMPONENTS AndroidExtras)
|
list(APPEND QT_EXTRA_COMPONENTS AndroidExtras)
|
||||||
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -llog)
|
LIST(APPEND SUBSURFACE_LINK_LIBRARIES -llog)
|
||||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
# add pthread to the end of the library list on Linux
|
# add pthread to the end of the library list on Linux
|
||||||
# this is only needed on Ubuntu
|
# this is only needed on Ubuntu
|
||||||
# but shouldn't hurt on other Linux versions
|
# but shouldn't hurt on other Linux versions
|
||||||
# in some builds we appear to be missing libz for some strange reason...
|
# in some builds we appear to be missing libz for some strange reason...
|
||||||
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -lz -lpthread)
|
LIST(APPEND SUBSURFACE_LINK_LIBRARIES -lz -lpthread)
|
||||||
|
|
||||||
# Test for ARM processor (Raspberry Pi) and add libGLESv2 if found
|
# Test for ARM processor (Raspberry Pi) and add libGLESv2 if found
|
||||||
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "armv6l")
|
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "armv6l")
|
||||||
message (STATUS "Found ARM processor. Adding libGLESv2")
|
message (STATUS "Found ARM processor. Adding libGLESv2")
|
||||||
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -lGLESv2)
|
LIST(APPEND SUBSURFACE_LINK_LIBRARIES -lGLESv2)
|
||||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||||
endif()
|
endif()
|
||||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||||
|
@ -301,7 +301,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||||
)
|
)
|
||||||
find_library(APP_SERVICES_LIBRARY ApplicationServices)
|
find_library(APP_SERVICES_LIBRARY ApplicationServices)
|
||||||
find_library(HID_LIB HidApi)
|
find_library(HID_LIB HidApi)
|
||||||
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} ${HID_LIB})
|
LIST(APPEND SUBSURFACE_LINK_LIBRARIES ${HID_LIB})
|
||||||
set(EXTRA_LIBS ${APP_SERVICES_LIBRARY})
|
set(EXTRA_LIBS ${APP_SERVICES_LIBRARY})
|
||||||
set(ICON_FILE ${CMAKE_SOURCE_DIR}/packaging/macosx/Subsurface.icns)
|
set(ICON_FILE ${CMAKE_SOURCE_DIR}/packaging/macosx/Subsurface.icns)
|
||||||
if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "MobileExecutable")
|
if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "MobileExecutable")
|
||||||
|
@ -320,7 +320,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||||
set_source_files_properties(${ICON_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
|
set_source_files_properties(${ICON_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
|
||||||
set(SUBSURFACE_PKG MACOSX_BUNDLE ${ICON_FILE})
|
set(SUBSURFACE_PKG MACOSX_BUNDLE ${ICON_FILE})
|
||||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||||
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -lwsock32 -lws2_32)
|
LIST(APPEND SUBSURFACE_LINK_LIBRARIES -lwsock32 -lws2_32)
|
||||||
remove_definitions(-DUNICODE)
|
remove_definitions(-DUNICODE)
|
||||||
add_definitions(-mwindows -D_WIN32)
|
add_definitions(-mwindows -D_WIN32)
|
||||||
endif()
|
endif()
|
||||||
|
@ -362,7 +362,7 @@ if(NOT ANDROID)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#set up the subsurface_link_libraries variable
|
#set up the subsurface_link_libraries variable
|
||||||
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} ${LIBDIVECOMPUTER_LIBRARIES} ${LIBGIT2_LIBRARIES} ${LIBUSB_LIBRARIES} ${LIBMTP_LIBRARIES})
|
LIST(APPEND SUBSURFACE_LINK_LIBRARIES ${LIBDIVECOMPUTER_LIBRARIES} ${LIBGIT2_LIBRARIES} ${LIBUSB_LIBRARIES} ${LIBMTP_LIBRARIES})
|
||||||
if (NOT SUBSURFACE_TARGET_EXECUTABLE MATCHES "DownloaderExecutable")
|
if (NOT SUBSURFACE_TARGET_EXECUTABLE MATCHES "DownloaderExecutable")
|
||||||
if(USINGQT6)
|
if(USINGQT6)
|
||||||
if(MAPSUPPORT)
|
if(MAPSUPPORT)
|
||||||
|
@ -378,7 +378,7 @@ endif()
|
||||||
|
|
||||||
# hack to build successfully on LGTM
|
# hack to build successfully on LGTM
|
||||||
if(DEFINED ENV{LGTM_SRC})
|
if(DEFINED ENV{LGTM_SRC})
|
||||||
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -lgssapi_krb5 -lhttp_parser)
|
LIST(APPEND SUBSURFACE_LINK_LIBRARIES -lgssapi_krb5 -lhttp_parser)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# include translations
|
# include translations
|
||||||
|
|
Loading…
Reference in a new issue