1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 12:49:54 +00:00
openmw-tes3mp/apps/browser/CMakeLists.txt

101 lines
2.4 KiB
Text
Raw Normal View History

2017-01-22 07:01:05 +00:00
2017-04-27 03:30:51 +00:00
set (CMAKE_CXX_STANDARD 14)
2017-01-22 07:01:05 +00:00
set(BROWSER_UI
${CMAKE_SOURCE_DIR}/files/tes3mp/ui/Main.ui
${CMAKE_SOURCE_DIR}/files/tes3mp/ui/ServerInfo.ui
2017-01-11 14:04:53 +00:00
)
set(BROWSER
2017-01-11 14:04:53 +00:00
main.cpp
2017-01-12 02:46:48 +00:00
MainWindow.cpp
2017-01-11 14:04:53 +00:00
ServerModel.cpp
ServerInfoDialog.cpp
2017-01-29 23:14:02 +00:00
MySortFilterProxyModel.cpp
2017-01-11 14:04:53 +00:00
netutils/HTTPNetwork.cpp
netutils/Utils.cpp
2017-04-27 03:30:51 +00:00
netutils/QueryClient.cpp
PingUpdater.cpp
PingHelper.cpp
QueryHelper.cpp
${CMAKE_SOURCE_DIR}/files/tes3mp/browser.rc
2017-01-11 14:04:53 +00:00
)
set(BROWSER_HEADER_MOC
2017-01-12 02:46:48 +00:00
MainWindow.hpp
2017-01-11 14:04:53 +00:00
ServerModel.hpp
ServerInfoDialog.hpp
2017-01-29 23:14:02 +00:00
MySortFilterProxyModel.hpp
PingUpdater.hpp
PingHelper.hpp
QueryHelper.hpp
2017-01-11 14:04:53 +00:00
)
set(BROWSER_HEADER
${BROWSER_HEADER_MOC}
2017-01-11 14:04:53 +00:00
netutils/HTTPNetwork.hpp
netutils/Utils.hpp
2017-04-27 03:30:51 +00:00
netutils/QueryClient.hpp
Types.hpp
2017-01-11 14:04:53 +00:00
)
source_group(browser FILES ${BROWSER} ${BROWSER_HEADER})
2017-01-11 14:04:53 +00:00
set(QT_USE_QTGUI 1)
# Set some platform specific settings
if(WIN32)
set(GUI_TYPE WIN32)
set(QT_USE_QTMAIN TRUE)
endif(WIN32)
if (DESIRED_QT_VERSION MATCHES 4)
message(SEND_ERROR "QT4 is not supported.")
#include(${QT_USE_FILE})
#QT4_ADD_RESOURCES(RCC_SRCS ${CMAKE_SOURCE_DIR}/files/launcher/launcher.qrc)
#QT4_WRAP_CPP(MOC_SRCS ${BROWSER_HEADER_MOC})
#QT4_WRAP_UI(UI_HDRS ${BROWSER_UI})
2017-01-11 14:04:53 +00:00
else()
QT5_ADD_RESOURCES(RCC_SRCS ${CMAKE_SOURCE_DIR}/files/launcher/launcher.qrc)
QT5_WRAP_CPP(MOC_SRCS ${BROWSER_HEADER_MOC})
QT5_WRAP_UI(UI_HDRS ${BROWSER_UI})
2017-01-11 14:04:53 +00:00
endif()
include_directories(${CMAKE_CURRENT_BINARY_DIR})
if(NOT WIN32)
include_directories(${LIBUNSHIELD_INCLUDE_DIR})
endif(NOT WIN32)
# Main executable
add_executable(tes3mp-browser
2017-01-11 14:04:53 +00:00
${GUI_TYPE}
${BROWSER}
${BROWSER_HEADER}
2017-01-11 14:04:53 +00:00
${RCC_SRCS}
${MOC_SRCS}
${UI_HDRS}
)
if (WIN32)
INSTALL(TARGETS tes3mp-browser RUNTIME DESTINATION ".")
2017-01-11 14:04:53 +00:00
endif (WIN32)
target_link_libraries(tes3mp-browser
2017-01-11 14:04:53 +00:00
${SDL2_LIBRARY_ONLY}
${RakNet_LIBRARY}
components
)
if (DESIRED_QT_VERSION MATCHES 4)
# target_link_libraries(tes3mp-browser ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY})
2017-01-11 14:04:53 +00:00
# if(WIN32)
# target_link_libraries(tes3mp-browser ${QT_QTMAIN_LIBRARY})
2017-01-11 14:04:53 +00:00
# endif(WIN32)
else()
qt5_use_modules(tes3mp-browser Widgets Core)
2017-01-11 14:04:53 +00:00
endif()
if (BUILD_WITH_CODE_COVERAGE)
add_definitions (--coverage)
target_link_libraries(tes3mp-browser gcov)
endif()