1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00
OpenMW/apps/launcher/CMakeLists.txt

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

109 lines
2.5 KiB
CMake
Raw Normal View History

2011-03-29 01:36:26 +02:00
set(LAUNCHER
2011-06-24 17:37:12 +02:00
datafilespage.cpp
graphicspage.cpp
sdlinit.cpp
2011-06-24 17:37:12 +02:00
main.cpp
maindialog.cpp
2013-08-18 12:11:39 +01:00
textslotmsgbox.cpp
2023-01-06 23:01:50 +04:00
importpage.cpp
2014-01-27 20:14:02 +01:00
settingspage.cpp
utils/cellnameloader.cpp
utils/profilescombobox.cpp
utils/textinputdialog.cpp
utils/lineedit.cpp
2021-04-09 19:28:08 +00:00
utils/openalutil.cpp
${CMAKE_SOURCE_DIR}/files/windows/launcher.rc
2011-03-29 01:36:26 +02:00
)
2011-06-24 17:37:12 +02:00
set(LAUNCHER_HEADER
datafilespage.hpp
graphicspage.hpp
sdlinit.hpp
2011-06-24 17:37:12 +02:00
maindialog.hpp
2013-08-18 12:11:39 +01:00
textslotmsgbox.hpp
2023-01-06 23:01:50 +04:00
importpage.hpp
2014-01-27 20:14:02 +01:00
settingspage.hpp
utils/cellnameloader.hpp
utils/profilescombobox.hpp
utils/textinputdialog.hpp
utils/lineedit.hpp
2021-04-09 19:28:08 +00:00
utils/openalutil.hpp
2011-06-24 17:37:12 +02:00
)
2011-06-24 17:37:12 +02:00
# Headers that must be pre-processed
2013-03-02 23:49:31 +01:00
set(LAUNCHER_UI
${CMAKE_CURRENT_SOURCE_DIR}/ui/datafilespage.ui
${CMAKE_CURRENT_SOURCE_DIR}/ui/graphicspage.ui
${CMAKE_CURRENT_SOURCE_DIR}/ui/mainwindow.ui
${CMAKE_CURRENT_SOURCE_DIR}/ui/importpage.ui
${CMAKE_CURRENT_SOURCE_DIR}/ui/settingspage.ui
${CMAKE_CURRENT_SOURCE_DIR}/ui/directorypicker.ui
2013-03-02 23:49:31 +01:00
)
source_group(launcher FILES ${LAUNCHER} ${LAUNCHER_HEADER})
2011-06-24 17:37:12 +02:00
2011-03-29 01:36:26 +02:00
set(QT_USE_QTGUI 1)
set (LAUNCHER_RES ${CMAKE_SOURCE_DIR}/files/launcher/launcher.qrc)
# Set some platform specific settings
if(WIN32)
set(LAUNCHER_RES ${LAUNCHER_RES} ${CMAKE_SOURCE_DIR}/files/windows/QWindowsVistaDark/dark.qrc)
set(GUI_TYPE WIN32)
set(QT_USE_QTMAIN TRUE)
endif(WIN32)
2011-06-26 15:37:06 +02:00
QT_ADD_RESOURCES(RCC_SRCS ${LAUNCHER_RES})
2023-02-05 15:30:28 +04:00
QT_WRAP_UI(UI_HDRS ${LAUNCHER_UI})
2013-08-17 22:56:50 +01:00
2013-08-19 20:11:52 +01:00
include_directories(${CMAKE_CURRENT_BINARY_DIR})
if(NOT WIN32)
2014-10-29 11:26:06 +02:00
include_directories(${LIBUNSHIELD_INCLUDE_DIR})
2013-08-19 20:11:52 +01:00
endif(NOT WIN32)
2011-03-29 01:36:26 +02:00
# Main executable
openmw_add_executable(openmw-launcher
${GUI_TYPE}
2011-06-24 17:37:12 +02:00
${LAUNCHER}
${LAUNCHER_HEADER}
2011-06-24 17:37:12 +02:00
${RCC_SRCS}
${MOC_SRCS}
2013-03-02 23:49:31 +01:00
${UI_HDRS}
2011-03-29 01:36:26 +02:00
)
2023-12-24 18:44:50 +04:00
add_dependencies(openmw-launcher qm-files)
if (WIN32)
INSTALL(TARGETS openmw-launcher RUNTIME DESTINATION ".")
endif (WIN32)
target_link_libraries(openmw-launcher
SDL2::SDL2
2021-04-09 19:28:08 +00:00
${OPENAL_LIBRARY}
components_qt
2011-03-29 01:36:26 +02:00
)
2013-08-17 22:56:50 +01:00
2024-04-21 20:56:06 +04:00
target_link_libraries(openmw-launcher Qt::Widgets Qt::Core Qt::Svg)
2011-09-30 09:36:06 +02:00
if (BUILD_WITH_CODE_COVERAGE)
target_compile_options(openmw-launcher PRIVATE --coverage)
2023-03-10 15:01:18 +01:00
target_link_libraries(openmw-launcher gcov)
endif()
if(USE_QT)
set_property(TARGET openmw-launcher PROPERTY AUTOMOC ON)
endif(USE_QT)
2017-09-08 22:21:00 +01:00
if (MSVC AND PRECOMPILE_HEADERS_WITH_MSVC)
target_precompile_headers(openmw-launcher PRIVATE
<boost/program_options/options_description.hpp>
<algorithm>
<string>
<vector>
)
endif()