2013-08-22 17:22:49 +03:00
|
|
|
project(vcmilauncher)
|
|
|
|
cmake_minimum_required(VERSION 2.8.7)
|
|
|
|
|
|
|
|
include_directories(${CMAKE_HOME_DIRECTORY} ${CMAKE_CURRENT_SOURCE_DIR})
|
2013-10-07 04:19:02 +03:00
|
|
|
include_directories(${Boost_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS})
|
2013-08-22 17:22:49 +03:00
|
|
|
|
|
|
|
set(launcher_modmanager_SRCS
|
2013-08-24 23:11:51 +03:00
|
|
|
modManager/cdownloadmanager_moc.cpp
|
2013-08-22 17:22:49 +03:00
|
|
|
modManager/cmodlist.cpp
|
2013-08-24 23:11:51 +03:00
|
|
|
modManager/cmodlistmodel_moc.cpp
|
|
|
|
modManager/cmodlistview_moc.cpp
|
2013-08-22 17:22:49 +03:00
|
|
|
modManager/cmodmanager.cpp
|
2014-03-23 15:08:01 +03:00
|
|
|
modManager/imageviewer.cpp
|
2013-08-22 17:22:49 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
set(launcher_settingsview_SRCS
|
2013-08-24 23:11:51 +03:00
|
|
|
settingsView/csettingsview_moc.cpp
|
2013-08-22 17:22:49 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
set(launcher_SRCS
|
2014-02-05 23:25:36 +03:00
|
|
|
StdInc.cpp
|
2013-08-22 17:22:49 +03:00
|
|
|
${launcher_modmanager_SRCS}
|
|
|
|
${launcher_settingsview_SRCS}
|
|
|
|
main.cpp
|
2013-08-24 23:11:51 +03:00
|
|
|
mainwindow_moc.cpp
|
2013-08-22 17:22:49 +03:00
|
|
|
launcherdirs.cpp
|
2013-09-21 21:29:26 +03:00
|
|
|
jsonutils.cpp
|
2013-08-22 17:22:49 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
set(launcher_FORMS
|
2013-08-24 23:11:51 +03:00
|
|
|
modManager/cmodlistview_moc.ui
|
2014-03-23 15:08:01 +03:00
|
|
|
modManager/imageviewer.ui
|
2013-08-24 23:11:51 +03:00
|
|
|
settingsView/csettingsview_moc.ui
|
|
|
|
mainwindow_moc.ui
|
2013-08-22 17:22:49 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
# Tell CMake to run moc when necessary:
|
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
|
|
|
|
# As moc files are generated in the binary dir, tell CMake
|
|
|
|
# to always look for includes there:
|
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
|
|
|
|
# We need add -DQT_WIDGETS_LIB when using QtWidgets in Qt 5.
|
|
|
|
add_definitions(${Qt5Widgets_DEFINITIONS})
|
|
|
|
add_definitions(${Qt5Network_DEFINITIONS})
|
|
|
|
|
|
|
|
# Executables fail to build with Qt 5 in the default configuration
|
|
|
|
# without -fPIE. We add that here.
|
|
|
|
set(CMAKE_CXX_FLAGS "${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS} ${CMAKE_CXX_FLAGS}")
|
|
|
|
|
|
|
|
qt5_wrap_ui(launcher_UI_HEADERS ${launcher_FORMS})
|
|
|
|
|
|
|
|
add_executable(vcmilauncher ${launcher_SRCS} ${launcher_UI_HEADERS})
|
|
|
|
|
|
|
|
# The Qt5Widgets_LIBRARIES variable also includes QtGui and QtCore
|
|
|
|
target_link_libraries(vcmilauncher vcmi ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES})
|
|
|
|
|
2014-03-23 19:36:16 +03:00
|
|
|
# temporary(?) disabled - generation of PCH takes too much time since cotire is trying to collect all Qt headers
|
|
|
|
#set_target_properties(vcmilauncher PROPERTIES ${PCH_PROPERTIES})
|
|
|
|
#cotire(vcmilauncher)
|
2014-02-01 16:37:26 +03:00
|
|
|
|
2013-08-22 17:22:49 +03:00
|
|
|
if (NOT APPLE) # Already inside bundle
|
|
|
|
install(TARGETS vcmilauncher DESTINATION ${BIN_DIR})
|
2013-09-05 02:00:51 +03:00
|
|
|
# copy whole directory but .svn control files
|
|
|
|
install(DIRECTORY icons DESTINATION ${DATA_DIR}/launcher PATTERN ".svn" EXCLUDE)
|
2013-08-22 17:22:49 +03:00
|
|
|
endif()
|
|
|
|
|