QTfrontend/CMakeLists.txt
author displacer
Sun, 01 Oct 2006 20:31:48 +0000
changeset 179 06e472d3f9f8
parent 177 c67c15e6fae3
child 184 f97a7a3dc8f6
permissions -rw-r--r--
base class for TCP connections :)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
73
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
     1
find_package(Qt4 REQUIRED)
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
     2
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
     3
include_directories(${QT_INCLUDES} .)
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
     4
119
665c07365cb6 Fix prefix issues
unc0rr
parents: 99
diff changeset
     5
if(WIN32 AND NOT UNIX)
665c07365cb6 Fix prefix issues
unc0rr
parents: 99
diff changeset
     6
	set(HEDGEWARS_BINDIR ".")
665c07365cb6 Fix prefix issues
unc0rr
parents: 99
diff changeset
     7
else(WIN32 AND NOT UNIX)
665c07365cb6 Fix prefix issues
unc0rr
parents: 99
diff changeset
     8
	set(HEDGEWARS_BINDIR ${CMAKE_INSTALL_PREFIX})
665c07365cb6 Fix prefix issues
unc0rr
parents: 99
diff changeset
     9
endif(WIN32 AND NOT UNIX)
665c07365cb6 Fix prefix issues
unc0rr
parents: 99
diff changeset
    10
665c07365cb6 Fix prefix issues
unc0rr
parents: 99
diff changeset
    11
configure_file(${hedgewars_SOURCE_DIR}/QTfrontend/main.cpp.in 
665c07365cb6 Fix prefix issues
unc0rr
parents: 99
diff changeset
    12
	${hedgewars_SOURCE_DIR}/QTfrontend/main.cpp)
665c07365cb6 Fix prefix issues
unc0rr
parents: 99
diff changeset
    13
73
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    14
set(hwfr_src 
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    15
	game.cpp
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    16
	main.cpp
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    17
	hwform.cpp 
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    18
	team.cpp
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    19
	netclient.cpp
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    20
	teamselect.cpp
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    21
	teamselhelper.cpp
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    22
	frameTeam.cpp
84
0f6669da2fcb Start rewrite ui
unc0rr
parents: 73
diff changeset
    23
	vertScrollArea.cpp
85
44d9045b26ff New GameCFGWidget. Now it's possible to set forts mode from ui
unc0rr
parents: 84
diff changeset
    24
	gameuiconfig.cpp
44d9045b26ff New GameCFGWidget. Now it's possible to set forts mode from ui
unc0rr
parents: 84
diff changeset
    25
	ui_hwform.cpp
89
f9db56409a86 - Fix various bugs
unc0rr
parents: 86
diff changeset
    26
	gamecfgwidget.cpp
93
c21ff3af56cf - small fix to translation
unc0rr
parents: 89
diff changeset
    27
	pages.cpp
133
c79cb5e5b24a - Multiplayer game start button
unc0rr
parents: 127
diff changeset
    28
	SquareLabel.cpp
164
92cff18a3ab6 first map preview added (still experimental)
displacer
parents: 133
diff changeset
    29
	hedgehogerWidget.cpp
92cff18a3ab6 first map preview added (still experimental)
displacer
parents: 133
diff changeset
    30
	hwmap.cpp
177
c67c15e6fae3 prepare uniting tcp classes
displacer
parents: 165
diff changeset
    31
	mapContainer.cpp
c67c15e6fae3 prepare uniting tcp classes
displacer
parents: 165
diff changeset
    32
	tcpBase.cpp)
73
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    33
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    34
if (WIN32)
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    35
	set(hwfr_src ${hwfr_src} res/hedgewars.rc)
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    36
endif (WIN32)
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    37
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    38
set(hwfr_moc_hdrs
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    39
	game.h
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    40
	hwform.h
165
9b9144948668 Many small fixes
unc0rr
parents: 164
diff changeset
    41
	binds.h
73
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    42
	netclient.h
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    43
	teamselect.h
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    44
	teamselhelper.h
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    45
	frameTeam.h
84
0f6669da2fcb Start rewrite ui
unc0rr
parents: 73
diff changeset
    46
	vertScrollArea.h
85
44d9045b26ff New GameCFGWidget. Now it's possible to set forts mode from ui
unc0rr
parents: 84
diff changeset
    47
	gameuiconfig.h
44d9045b26ff New GameCFGWidget. Now it's possible to set forts mode from ui
unc0rr
parents: 84
diff changeset
    48
	ui_hwform.h
86
664b536a1c27 Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents: 85
diff changeset
    49
	gamecfgwidget.h
89
f9db56409a86 - Fix various bugs
unc0rr
parents: 86
diff changeset
    50
	predefteams.h
93
c21ff3af56cf - small fix to translation
unc0rr
parents: 89
diff changeset
    51
	pages.h
133
c79cb5e5b24a - Multiplayer game start button
unc0rr
parents: 127
diff changeset
    52
	SquareLabel.h
164
92cff18a3ab6 first map preview added (still experimental)
displacer
parents: 133
diff changeset
    53
	hedgehogerWidget.h
92cff18a3ab6 first map preview added (still experimental)
displacer
parents: 133
diff changeset
    54
	hwmap.h
177
c67c15e6fae3 prepare uniting tcp classes
displacer
parents: 165
diff changeset
    55
	mapContainer.h
c67c15e6fae3 prepare uniting tcp classes
displacer
parents: 165
diff changeset
    56
	tcpBase.h)
73
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    57
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    58
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    59
set(hwfr_rez
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    60
	hedgewars.qrc)
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    61
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    62
qt4_add_resources(hwfr_rez_src
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    63
	${hwfr_rez})
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    64
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    65
qt4_wrap_cpp(hwfr_moc_srcs
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    66
	${hwfr_moc_hdrs})
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    67
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    68
add_executable(hedgewars WIN32
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    69
	${hwfr_src}
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    70
	${hwfr_moc_srcs}
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    71
	${hwfr_rez_src})
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    72
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    73
target_link_libraries(hedgewars 
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    74
	${QT_QTCORE_LIBRARY}
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    75
	${QT_QTGUI_LIBRARY}
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    76
	${QT_QTNETWORK_LIBRARY}
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    77
	${QT_QTMAIN_LIBRARY})
fe1c62875a19 - More smooth hedgehogs physics
unc0rr
parents:
diff changeset
    78
89
f9db56409a86 - Fix various bugs
unc0rr
parents: 86
diff changeset
    79
install(PROGRAMS "hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION bin)
99
fd9613278d1b - On windows make packages with all needed dlls
unc0rr
parents: 93
diff changeset
    80
fd9613278d1b - On windows make packages with all needed dlls
unc0rr
parents: 93
diff changeset
    81
fd9613278d1b - On windows make packages with all needed dlls
unc0rr
parents: 93
diff changeset
    82
if(WIN32 AND NOT UNIX)
fd9613278d1b - On windows make packages with all needed dlls
unc0rr
parents: 93
diff changeset
    83
	string(REPLACE "\\" "/" QT_BIN_DIR $ENV{QTDIR}/bin)
fd9613278d1b - On windows make packages with all needed dlls
unc0rr
parents: 93
diff changeset
    84
fd9613278d1b - On windows make packages with all needed dlls
unc0rr
parents: 93
diff changeset
    85
	install(FILES
fd9613278d1b - On windows make packages with all needed dlls
unc0rr
parents: 93
diff changeset
    86
		"${QT_BIN_DIR}/QtNetwork4.dll"
fd9613278d1b - On windows make packages with all needed dlls
unc0rr
parents: 93
diff changeset
    87
		"${QT_BIN_DIR}/QtGui4.dll"
fd9613278d1b - On windows make packages with all needed dlls
unc0rr
parents: 93
diff changeset
    88
		"${QT_BIN_DIR}/QtCore4.dll"
fd9613278d1b - On windows make packages with all needed dlls
unc0rr
parents: 93
diff changeset
    89
		"${QT_BIN_DIR}/mingwm10.dll"
fd9613278d1b - On windows make packages with all needed dlls
unc0rr
parents: 93
diff changeset
    90
		DESTINATION bin)
fd9613278d1b - On windows make packages with all needed dlls
unc0rr
parents: 93
diff changeset
    91
endif(WIN32 AND NOT UNIX)