2011-03-28 23:36:26 +00:00
|
|
|
set(LAUNCHER
|
2011-06-24 15:37:12 +00:00
|
|
|
datafilespage.cpp
|
|
|
|
graphicspage.cpp
|
|
|
|
main.cpp
|
|
|
|
maindialog.cpp
|
|
|
|
playpage.cpp
|
2013-08-18 11:11:39 +00:00
|
|
|
textslotmsgbox.cpp
|
2014-01-27 19:14:02 +00:00
|
|
|
settingspage.cpp
|
2012-10-10 19:31:40 +00:00
|
|
|
|
2013-01-25 04:19:06 +00:00
|
|
|
settings/graphicssettings.cpp
|
|
|
|
|
2013-10-23 02:52:35 +00:00
|
|
|
utils/profilescombobox.cpp
|
|
|
|
utils/textinputdialog.cpp
|
|
|
|
utils/lineedit.cpp
|
2012-10-12 00:25:14 +00:00
|
|
|
|
2014-09-05 12:36:33 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/files/windows/launcher.rc
|
2011-03-28 23:36:26 +00:00
|
|
|
)
|
|
|
|
|
2011-06-24 15:37:12 +00:00
|
|
|
set(LAUNCHER_HEADER
|
|
|
|
datafilespage.hpp
|
|
|
|
graphicspage.hpp
|
|
|
|
maindialog.hpp
|
|
|
|
playpage.hpp
|
2013-08-18 11:11:39 +00:00
|
|
|
textslotmsgbox.hpp
|
2014-01-27 19:14:02 +00:00
|
|
|
settingspage.hpp
|
2012-10-10 19:31:40 +00:00
|
|
|
|
2013-01-25 04:19:06 +00:00
|
|
|
settings/graphicssettings.hpp
|
|
|
|
|
2013-10-23 02:52:35 +00:00
|
|
|
utils/profilescombobox.hpp
|
|
|
|
utils/textinputdialog.hpp
|
|
|
|
utils/lineedit.hpp
|
2011-06-24 15:37:12 +00:00
|
|
|
)
|
2011-06-06 23:42:53 +00:00
|
|
|
|
2011-06-24 15:37:12 +00:00
|
|
|
# Headers that must be pre-processed
|
|
|
|
set(LAUNCHER_HEADER_MOC
|
|
|
|
datafilespage.hpp
|
|
|
|
graphicspage.hpp
|
|
|
|
maindialog.hpp
|
|
|
|
playpage.hpp
|
2013-08-18 11:11:39 +00:00
|
|
|
textslotmsgbox.hpp
|
2014-01-27 19:14:02 +00:00
|
|
|
settingspage.hpp
|
2012-10-10 19:31:40 +00:00
|
|
|
|
2013-10-23 02:52:35 +00:00
|
|
|
utils/textinputdialog.hpp
|
|
|
|
utils/profilescombobox.hpp
|
|
|
|
utils/lineedit.hpp
|
|
|
|
|
2011-03-28 23:36:26 +00:00
|
|
|
)
|
|
|
|
|
2013-03-02 22:49:31 +00:00
|
|
|
set(LAUNCHER_UI
|
2013-03-12 03:05:14 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/files/ui/datafilespage.ui
|
|
|
|
${CMAKE_SOURCE_DIR}/files/ui/graphicspage.ui
|
|
|
|
${CMAKE_SOURCE_DIR}/files/ui/mainwindow.ui
|
|
|
|
${CMAKE_SOURCE_DIR}/files/ui/playpage.ui
|
2013-10-23 02:52:35 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/files/ui/contentselector.ui
|
2014-01-27 19:14:02 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/files/ui/settingspage.ui
|
2013-03-02 22:49:31 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
source_group(launcher FILES ${LAUNCHER} ${LAUNCHER_HEADER})
|
2011-06-24 15:37:12 +00:00
|
|
|
|
2011-03-28 23:36:26 +00:00
|
|
|
set(QT_USE_QTGUI 1)
|
|
|
|
|
2012-03-12 01:31:37 +00:00
|
|
|
# Set some platform specific settings
|
|
|
|
if(WIN32)
|
|
|
|
set(GUI_TYPE WIN32)
|
|
|
|
set(QT_USE_QTMAIN TRUE)
|
|
|
|
endif(WIN32)
|
2011-06-26 13:37:06 +00:00
|
|
|
|
2015-06-12 13:10:12 +00:00
|
|
|
if (DESIRED_QT_VERSION MATCHES 4)
|
|
|
|
include(${QT_USE_FILE})
|
|
|
|
QT4_ADD_RESOURCES(RCC_SRCS ${CMAKE_SOURCE_DIR}/files/launcher/launcher.qrc)
|
|
|
|
QT4_WRAP_CPP(MOC_SRCS ${LAUNCHER_HEADER_MOC})
|
|
|
|
QT4_WRAP_UI(UI_HDRS ${LAUNCHER_UI})
|
|
|
|
else()
|
|
|
|
QT5_ADD_RESOURCES(RCC_SRCS ${CMAKE_SOURCE_DIR}/files/launcher/launcher.qrc)
|
|
|
|
QT5_WRAP_CPP(MOC_SRCS ${LAUNCHER_HEADER_MOC})
|
|
|
|
QT5_WRAP_UI(UI_HDRS ${LAUNCHER_UI})
|
|
|
|
endif()
|
2013-08-17 21:56:50 +00:00
|
|
|
|
2013-08-19 19:11:52 +00:00
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
if(NOT WIN32)
|
2014-10-29 09:26:06 +00:00
|
|
|
include_directories(${LIBUNSHIELD_INCLUDE_DIR})
|
2013-08-19 19:11:52 +00:00
|
|
|
endif(NOT WIN32)
|
2011-03-28 23:36:26 +00:00
|
|
|
|
|
|
|
# Main executable
|
2015-01-29 23:07:18 +00:00
|
|
|
add_executable(openmw-launcher
|
2012-03-12 01:31:37 +00:00
|
|
|
${GUI_TYPE}
|
2011-06-24 15:37:12 +00:00
|
|
|
${LAUNCHER}
|
2013-02-11 14:01:00 +00:00
|
|
|
${LAUNCHER_HEADER}
|
2011-06-24 15:37:12 +00:00
|
|
|
${RCC_SRCS}
|
|
|
|
${MOC_SRCS}
|
2013-03-02 22:49:31 +00:00
|
|
|
${UI_HDRS}
|
2011-03-28 23:36:26 +00:00
|
|
|
)
|
|
|
|
|
2015-01-29 23:07:18 +00:00
|
|
|
target_link_libraries(openmw-launcher
|
2014-06-02 07:34:43 +00:00
|
|
|
${SDL2_LIBRARY_ONLY}
|
2011-11-06 08:30:15 +00:00
|
|
|
components
|
2011-03-28 23:36:26 +00:00
|
|
|
)
|
2013-08-17 21:56:50 +00:00
|
|
|
|
2015-06-12 13:10:12 +00:00
|
|
|
if (DESIRED_QT_VERSION MATCHES 4)
|
|
|
|
target_link_libraries(openmw-launcher ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY})
|
|
|
|
else()
|
|
|
|
qt5_use_modules(openmw-launcher Widgets Core)
|
|
|
|
endif()
|
2011-09-30 07:36:06 +00:00
|
|
|
|
2012-08-19 19:23:46 +00:00
|
|
|
if (BUILD_WITH_CODE_COVERAGE)
|
|
|
|
add_definitions (--coverage)
|
2015-01-29 23:07:18 +00:00
|
|
|
target_link_libraries(openmw-launcher gcov)
|
2012-08-19 19:23:46 +00:00
|
|
|
endif()
|
2013-04-17 10:04:05 +00:00
|
|
|
|
2015-06-12 13:10:12 +00:00
|
|
|
|