mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Don't rely on CMAKE_AUTOUIC
Some old CMakes that we use had problems with it, change to use the qt5_wrap_ui macro that's bundled with Qt. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e1d43ade27
commit
c71df5baa5
4 changed files with 56 additions and 5 deletions
|
@ -7,7 +7,7 @@ cmake_minimum_required(VERSION 2.8.11)
|
||||||
# global settings
|
# global settings
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_AUTOUIC ON)
|
|
||||||
option(LIBGIT2_FROM_PKGCONFIG "use pkg-config to retrieve libgit2" OFF)
|
option(LIBGIT2_FROM_PKGCONFIG "use pkg-config to retrieve libgit2" OFF)
|
||||||
option(LIBDC_FROM_PKGCONFIG "use pkg-config to retrieve libdivecomputer" OFF)
|
option(LIBDC_FROM_PKGCONFIG "use pkg-config to retrieve libdivecomputer" OFF)
|
||||||
option(LIBGRANTLEE_FROM_PKGCONFIG "use pkg-config to retrieve grantlee" OFF)
|
option(LIBGRANTLEE_FROM_PKGCONFIG "use pkg-config to retrieve grantlee" OFF)
|
||||||
|
|
|
@ -17,6 +17,37 @@ if(NOT DISABLE_PLUGINS)
|
||||||
add_subdirectory(plugins)
|
add_subdirectory(plugins)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set (SUBSURFACE_UI
|
||||||
|
about.ui
|
||||||
|
btdeviceselectiondialog.ui
|
||||||
|
configuredivecomputerdialog.ui
|
||||||
|
divecomponentselection.ui
|
||||||
|
divecomputermanagementdialog.ui
|
||||||
|
divelogexportdialog.ui
|
||||||
|
divelogimportdialog.ui
|
||||||
|
diveplanner.ui
|
||||||
|
diveshareexportdialog.ui
|
||||||
|
downloadfromdivecomputer.ui
|
||||||
|
filterwidget.ui
|
||||||
|
listfilter.ui
|
||||||
|
locationInformation.ui
|
||||||
|
maintab.ui
|
||||||
|
mainwindow.ui
|
||||||
|
plannerDetails.ui
|
||||||
|
plannerSettings.ui
|
||||||
|
printoptions.ui
|
||||||
|
renumber.ui
|
||||||
|
searchbar.ui
|
||||||
|
setpoint.ui
|
||||||
|
shiftimagetimes.ui
|
||||||
|
shifttimes.ui
|
||||||
|
tableview.ui
|
||||||
|
templateedit.ui
|
||||||
|
urldialog.ui
|
||||||
|
usersurvey.ui
|
||||||
|
webservices.ui
|
||||||
|
)
|
||||||
|
|
||||||
# the interface, in C++
|
# the interface, in C++
|
||||||
set(SUBSURFACE_INTERFACE
|
set(SUBSURFACE_INTERFACE
|
||||||
updatemanager.cpp
|
updatemanager.cpp
|
||||||
|
@ -81,9 +112,11 @@ set(SUBSURFACE_STATISTICS_LIB_SRCS
|
||||||
)
|
)
|
||||||
source_group("Subsurface Statistics" FILES ${SUBSURFACE_STATISTICS_LIB_SRCS})
|
source_group("Subsurface Statistics" FILES ${SUBSURFACE_STATISTICS_LIB_SRCS})
|
||||||
|
|
||||||
|
qt5_wrap_ui(SUBSURFACE_UI_SRCS ${SUBSURFACE_UI})
|
||||||
|
|
||||||
add_library(subsurface_statistics STATIC ${SUBSURFACE_STATISTICS_LIB_SRCS})
|
add_library(subsurface_statistics STATIC ${SUBSURFACE_STATISTICS_LIB_SRCS})
|
||||||
target_link_libraries(subsurface_statistics ${QT_LIBRARIES})
|
target_link_libraries(subsurface_statistics ${QT_LIBRARIES})
|
||||||
add_library(subsurface_generated_ui STATIC ${SUBSURFACE_UI_HDRS})
|
add_library(subsurface_generated_ui STATIC ${SUBSURFACE_UI_HDRS})
|
||||||
target_link_libraries(subsurface_generated_ui ${QT_LIBRARIES})
|
target_link_libraries(subsurface_generated_ui ${QT_LIBRARIES})
|
||||||
add_library(subsurface_interface STATIC ${SUBSURFACE_INTERFACE})
|
add_library(subsurface_interface STATIC ${SUBSURFACE_INTERFACE} ${SUBSURFACE_UI_SRCS})
|
||||||
target_link_libraries(subsurface_interface ${QT_LIBRARIES} ${MARBLE_LIBRARIES} ${GRANTLEE_LIBRARIES} subsurface_desktop_preferences)
|
target_link_libraries(subsurface_interface ${QT_LIBRARIES} ${MARBLE_LIBRARIES} ${GRANTLEE_LIBRARIES} subsurface_desktop_preferences)
|
||||||
|
|
|
@ -1,7 +1,17 @@
|
||||||
set(FACEBOOK_PLUGIN_SRCS facebook_integration.cpp facebookconnectwidget.cpp)
|
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
add_library(facebook_integration STATIC ${FACEBOOK_PLUGIN_SRCS})
|
set(FACEBOOK_PLUGIN_UI
|
||||||
|
facebookconnectwidget.ui
|
||||||
|
socialnetworksdialog.ui
|
||||||
|
)
|
||||||
|
|
||||||
|
set(FACEBOOK_PLUGIN_SRCS
|
||||||
|
facebook_integration.cpp
|
||||||
|
facebookconnectwidget.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
qt5_wrap_ui(FACEBOOK_PLUGIN_UI_SRCS ${FACEBOOK_PLUGIN_UI})
|
||||||
|
add_library(facebook_integration STATIC ${FACEBOOK_PLUGIN_SRCS} ${FACEBOOK_PLUGIN_UI_SRCS})
|
||||||
target_link_libraries(facebook_integration ${QT_LIBRARIES})
|
target_link_libraries(facebook_integration ${QT_LIBRARIES})
|
||||||
add_dependencies(facebook_integration subsurface_corelib)
|
add_dependencies(facebook_integration subsurface_corelib)
|
|
@ -4,7 +4,15 @@ include_directories(.
|
||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
file(GLOB SUBSURFACE_PREFERENCES_UI *.ui)
|
set(SUBSURFACE_PREFERENCES_UI
|
||||||
|
preferences_defaults.ui
|
||||||
|
preferences_graph.ui
|
||||||
|
preferences_network.ui
|
||||||
|
preferences_units.ui
|
||||||
|
prefs_georeference.ui
|
||||||
|
prefs_language.ui
|
||||||
|
)
|
||||||
|
|
||||||
qt5_wrap_ui(SUBSURFACE_PREFERENCES_UI_HDRS ${SUBSURFACE_PREFERENCES_UI})
|
qt5_wrap_ui(SUBSURFACE_PREFERENCES_UI_HDRS ${SUBSURFACE_PREFERENCES_UI})
|
||||||
|
|
||||||
source_group("Subsurface Interface Files" FILES ${SUBSURFACE_PREFERENCES_UI})
|
source_group("Subsurface Interface Files" FILES ${SUBSURFACE_PREFERENCES_UI})
|
||||||
|
|
Loading…
Add table
Reference in a new issue