|
|
|
@ -1,8 +1,8 @@
|
|
|
|
|
set(NETLAUNCHER_UI
|
|
|
|
|
set(BROWSER_UI
|
|
|
|
|
${CMAKE_SOURCE_DIR}/files/ui/Main.ui
|
|
|
|
|
${CMAKE_SOURCE_DIR}/files/ui/ServerInfo.ui
|
|
|
|
|
)
|
|
|
|
|
set(NETLAUNCHER
|
|
|
|
|
set(BROWSER
|
|
|
|
|
main.cpp
|
|
|
|
|
MainWindow.cpp
|
|
|
|
|
ServerModel.cpp
|
|
|
|
@ -10,23 +10,23 @@ set(NETLAUNCHER
|
|
|
|
|
ServerInfoDialog.cpp
|
|
|
|
|
netutils/HTTPNetwork.cpp
|
|
|
|
|
netutils/Utils.cpp
|
|
|
|
|
${CMAKE_SOURCE_DIR}/files/tes3mp/netlauncher.rc
|
|
|
|
|
${CMAKE_SOURCE_DIR}/files/tes3mp/browser.rc
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
set(NETLAUNCHER_HEADER_MOC
|
|
|
|
|
set(BROWSER_HEADER_MOC
|
|
|
|
|
MainWindow.hpp
|
|
|
|
|
ServerModel.hpp
|
|
|
|
|
ServerInfoDialog.hpp
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
set(NETLAUNCHER_HEADER
|
|
|
|
|
${NETLAUNCHER_HEADER_MOC}
|
|
|
|
|
set(BROWSER_HEADER
|
|
|
|
|
${BROWSER_HEADER_MOC}
|
|
|
|
|
NetController.hpp
|
|
|
|
|
netutils/HTTPNetwork.hpp
|
|
|
|
|
netutils/Utils.hpp
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
source_group(netlauncher FILES ${NETLAUNCHER} ${NETLAUNCHER_HEADER})
|
|
|
|
|
source_group(browser FILES ${BROWSER} ${BROWSER_HEADER})
|
|
|
|
|
|
|
|
|
|
set(QT_USE_QTGUI 1)
|
|
|
|
|
|
|
|
|
@ -40,12 +40,12 @@ 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 ${NETLAUNCHER_HEADER_MOC})
|
|
|
|
|
#QT4_WRAP_UI(UI_HDRS ${NETLAUNCHER_UI})
|
|
|
|
|
#QT4_WRAP_CPP(MOC_SRCS ${BROWSER_HEADER_MOC})
|
|
|
|
|
#QT4_WRAP_UI(UI_HDRS ${BROWSER_UI})
|
|
|
|
|
else()
|
|
|
|
|
QT5_ADD_RESOURCES(RCC_SRCS ${CMAKE_SOURCE_DIR}/files/launcher/launcher.qrc)
|
|
|
|
|
QT5_WRAP_CPP(MOC_SRCS ${NETLAUNCHER_HEADER_MOC})
|
|
|
|
|
QT5_WRAP_UI(UI_HDRS ${NETLAUNCHER_UI})
|
|
|
|
|
QT5_WRAP_CPP(MOC_SRCS ${BROWSER_HEADER_MOC})
|
|
|
|
|
QT5_WRAP_UI(UI_HDRS ${BROWSER_UI})
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
@ -54,35 +54,35 @@ if(NOT WIN32)
|
|
|
|
|
endif(NOT WIN32)
|
|
|
|
|
|
|
|
|
|
# Main executable
|
|
|
|
|
add_executable(tes3mp-netlauncher
|
|
|
|
|
add_executable(tes3mp-browser
|
|
|
|
|
${GUI_TYPE}
|
|
|
|
|
${NETLAUNCHER}
|
|
|
|
|
${NETLAUNCHER_HEADER}
|
|
|
|
|
${BROWSER}
|
|
|
|
|
${BROWSER_HEADER}
|
|
|
|
|
${RCC_SRCS}
|
|
|
|
|
${MOC_SRCS}
|
|
|
|
|
${UI_HDRS}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
if (WIN32)
|
|
|
|
|
INSTALL(TARGETS tes3mp-netlauncher RUNTIME DESTINATION ".")
|
|
|
|
|
INSTALL(TARGETS tes3mp-browser RUNTIME DESTINATION ".")
|
|
|
|
|
endif (WIN32)
|
|
|
|
|
|
|
|
|
|
target_link_libraries(tes3mp-netlauncher
|
|
|
|
|
target_link_libraries(tes3mp-browser
|
|
|
|
|
${SDL2_LIBRARY_ONLY}
|
|
|
|
|
${RakNet_LIBRARY}
|
|
|
|
|
components
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
if (DESIRED_QT_VERSION MATCHES 4)
|
|
|
|
|
# target_link_libraries(tes3mp-netlauncher ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY})
|
|
|
|
|
# target_link_libraries(tes3mp-browser ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY})
|
|
|
|
|
# if(WIN32)
|
|
|
|
|
# target_link_libraries(tes3mp-netlauncher ${QT_QTMAIN_LIBRARY})
|
|
|
|
|
# target_link_libraries(tes3mp-browser ${QT_QTMAIN_LIBRARY})
|
|
|
|
|
# endif(WIN32)
|
|
|
|
|
else()
|
|
|
|
|
qt5_use_modules(tes3mp-netlauncher Widgets Core)
|
|
|
|
|
qt5_use_modules(tes3mp-browser Widgets Core)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if (BUILD_WITH_CODE_COVERAGE)
|
|
|
|
|
add_definitions (--coverage)
|
|
|
|
|
target_link_libraries(tes3mp-netlauncher gcov)
|
|
|
|
|
target_link_libraries(tes3mp-browser gcov)
|
|
|
|
|
endif()
|