QTfrontend/CMakeLists.txt
changeset 4520 e7882bd1a894
parent 4410 f9e38ce1e813
child 4775 663aa9552bfc
child 4812 f924be23ffb4
--- a/QTfrontend/CMakeLists.txt	Mon Dec 13 19:26:20 2010 +0100
+++ b/QTfrontend/CMakeLists.txt	Mon Dec 13 22:12:30 2010 +0300
@@ -23,136 +23,142 @@
 include_directories(${SDL_INCLUDE_DIR})
 include_directories(${SDLMIXER_INCLUDE_DIR})
 if(UNIX)
-	# HACK: in freebsd cannot find iconv.h included via SDL.h
-	include_directories("/usr/local/include")
+    # HACK: in freebsd cannot find iconv.h included via SDL.h
+    include_directories("/usr/local/include")
 endif(UNIX)
 
 
 if(WIN32 AND NOT UNIX)
-	set(HEDGEWARS_BINDIR ".")
-	set(HEDGEWARS_DATADIR "../share/")
+    set(HEDGEWARS_BINDIR ".")
+    set(HEDGEWARS_DATADIR "../share/")
         add_definitions(-DUSE_XFIRE)
 else()
-	set(HEDGEWARS_BINDIR ${CMAKE_INSTALL_PREFIX})
-	if(DEFINED DATA_INSTALL_DIR)
-		set(HEDGEWARS_DATADIR ${DATA_INSTALL_DIR})
-	else()
-		set(HEDGEWARS_DATADIR ${CMAKE_INSTALL_PREFIX}/share/)
-	endif()
+    set(HEDGEWARS_BINDIR ${CMAKE_INSTALL_PREFIX})
+    if(DEFINED DATA_INSTALL_DIR)
+        set(HEDGEWARS_DATADIR ${DATA_INSTALL_DIR})
+    else()
+        set(HEDGEWARS_DATADIR ${CMAKE_INSTALL_PREFIX}/share/)
+    endif()
 endif()
 
 
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/hwconsts.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/hwconsts.cpp)
 
-set(	hwfr_src
-	game.cpp
-	main.cpp
-	hwform.cpp
-	team.cpp
-	namegen.cpp
-	teamselect.cpp
-	teamselhelper.cpp
-	frameTeam.cpp
-	vertScrollArea.cpp
-	gameuiconfig.cpp
-	ui_hwform.cpp
-	gamecfgwidget.cpp
-	pages.cpp
-	SquareLabel.cpp
-	hats.cpp
-	hedgehogerWidget.cpp
-	hwmap.cpp
-	mapContainer.cpp
-	tcpBase.cpp
-	about.cpp
-	proto.cpp
-	fpsedit.cpp
-	netserver.cpp
-	newnetclient.cpp
-	netudpserver.cpp
-	netudpwidget.cpp
-	netregister.cpp
-	netserverslist.cpp
-	chatwidget.cpp
-	binds.cpp
-	SDLs.cpp
-	playrecordpage.cpp
-	${CMAKE_CURRENT_BINARY_DIR}/hwconsts.cpp
-	selectWeapon.cpp
-	itemNum.cpp
-	input_ip.cpp
-	igbox.cpp
-	weaponItem.cpp
-	statsPage.cpp
-	misc.cpp
-	ammoSchemeModel.cpp
-	togglebutton.cpp
-	bgwidget.cpp
-	achievements.cpp
-	)
+set(hwfr_src
+    game.cpp
+    main.cpp
+    hwform.cpp
+    team.cpp
+    namegen.cpp
+    teamselect.cpp
+    teamselhelper.cpp
+    frameTeam.cpp
+    vertScrollArea.cpp
+    gameuiconfig.cpp
+    ui_hwform.cpp
+    gamecfgwidget.cpp
+    pages.cpp
+    SquareLabel.cpp
+    hats.cpp
+    hedgehogerWidget.cpp
+    hwmap.cpp
+    mapContainer.cpp
+    tcpBase.cpp
+    about.cpp
+    proto.cpp
+    fpsedit.cpp
+    netserver.cpp
+    newnetclient.cpp
+    netudpserver.cpp
+    netudpwidget.cpp
+    netregister.cpp
+    netserverslist.cpp
+    chatwidget.cpp
+    binds.cpp
+    SDLs.cpp
+    playrecordpage.cpp
+    ${CMAKE_CURRENT_BINARY_DIR}/hwconsts.cpp
+    selectWeapon.cpp
+    itemNum.cpp
+    input_ip.cpp
+    igbox.cpp
+    weaponItem.cpp
+    statsPage.cpp
+    misc.cpp
+    ammoSchemeModel.cpp
+    togglebutton.cpp
+    bgwidget.cpp
+    achievements.cpp
+    qaspectratiolayout.cpp
+    drawmapwidget.cpp
+    drawmapscene.cpp
+    )
 
 #xfire integration
 if(WIN32)
-	set(hwfr_src ${hwfr_src} xfire.cpp ../misc/xfire/xfiregameclient.cpp)
+    set(hwfr_src ${hwfr_src} xfire.cpp ../misc/xfire/xfiregameclient.cpp)
 endif(WIN32)
 
 if(MINGW)
-	# resource compilation for mingw
-	add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o
-	COMMAND windres -I ${CMAKE_CURRENT_SOURCE_DIR}
-	-i ${CMAKE_CURRENT_SOURCE_DIR}/hedgewars.rc
-	-o ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o)
-	set(hwfr_src ${hwfr_src} ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o)
+    # resource compilation for mingw
+    add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o
+    COMMAND windres -I ${CMAKE_CURRENT_SOURCE_DIR}
+    -i ${CMAKE_CURRENT_SOURCE_DIR}/hedgewars.rc
+    -o ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o)
+    set(hwfr_src ${hwfr_src} ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o)
 else(MINGW)
-	set(hwfr_src ${hwfr_src} hedgewars.rc)
+    set(hwfr_src ${hwfr_src} hedgewars.rc)
 endif(MINGW)
 
-set(	hwfr_moc_hdrs
-	game.h
-	hats.h
-	hwform.h
-	teamselect.h
-	teamselhelper.h
-	frameTeam.h
-	vertScrollArea.h
-	gameuiconfig.h
-	gamecfgwidget.h
-	pages.h
-	SquareLabel.h
-	hedgehogerWidget.h
-	hwmap.h
-	mapContainer.h
-	tcpBase.h
-	about.h
-	proto.h
-	fpsedit.h
-	netserver.h
-	newnetclient.h
-	netudpserver.h
-	netudpwidget.h
-	netregister.h
-	netserverslist.h
-	chatwidget.h
-	SDLs.h
-	playrecordpage.h
-	selectWeapon.h
-	itemNum.h
-	input_ip.h
-	igbox.h
-	weaponItem.h
-	statsPage.h
-	misc.h
-	ammoSchemeModel.h
-	togglebutton.h
-	bgwidget.h
-	)
+set(hwfr_moc_hdrs
+    game.h
+    hats.h
+    hwform.h
+    teamselect.h
+    teamselhelper.h
+    frameTeam.h
+    vertScrollArea.h
+    gameuiconfig.h
+    gamecfgwidget.h
+    pages.h
+    SquareLabel.h
+    hedgehogerWidget.h
+    hwmap.h
+    mapContainer.h
+    tcpBase.h
+    about.h
+    proto.h
+    fpsedit.h
+    netserver.h
+    newnetclient.h
+    netudpserver.h
+    netudpwidget.h
+    netregister.h
+    netserverslist.h
+    chatwidget.h
+    SDLs.h
+    playrecordpage.h
+    selectWeapon.h
+    itemNum.h
+    input_ip.h
+    igbox.h
+    weaponItem.h
+    statsPage.h
+    misc.h
+    ammoSchemeModel.h
+    togglebutton.h
+    bgwidget.h
+    qaspectratiolayout.h
+    drawmapwidget.h
+    drawmapscene.h
+    )
 
-set(	hwfr_hdrs
-	binds.h
-	ui_hwform.h
-	KB.h
-	hwconsts.h
-	)
+set(hwfr_hdrs
+    binds.h
+    ui_hwform.h
+    KB.h
+    hwconsts.h
+    )
 
 set(hwfr_rez hedgewars.qrc)
 
@@ -162,45 +168,45 @@
 
 
 if(APPLE)
-	set(hwfr_src ${hwfr_src} InstallController.cpp CocoaInitializer.mm M3Panel.mm M3InstallController.m NSWorkspace_RBAdditions.m)
-	set(HW_LINK_LIBS IOKit)
+    set(hwfr_src ${hwfr_src} InstallController.cpp CocoaInitializer.mm M3Panel.mm M3InstallController.m NSWorkspace_RBAdditions.m)
+    set(HW_LINK_LIBS IOKit)
 
-	find_package(Sparkle)
-	if(SPARKLE_FOUND)
+    find_package(Sparkle)
+    if(SPARKLE_FOUND)
                 add_definitions(-DSPARKLE_ENABLED)
-		set(hwfr_src ${hwfr_src} AutoUpdater.cpp SparkleAutoUpdater.mm)
+        set(hwfr_src ${hwfr_src} AutoUpdater.cpp SparkleAutoUpdater.mm)
                 set(HW_LINK_LIBS ${SPARKLE_LIBRARY} ${HW_LINK_LIBS})
-	endif()
+    endif()
 endif()
 
 
 add_executable(hedgewars WIN32
-	${hwfr_src}
-	${hwfr_moc_srcs}
-	${hwfr_hdrs}
-	${hwfr_rez_src}
-	)
+    ${hwfr_src}
+    ${hwfr_moc_srcs}
+    ${hwfr_hdrs}
+    ${hwfr_rez_src}
+    )
 
 
-set(	HW_LINK_LIBS
-	${QT_LIBRARIES}
-	${SDL_LIBRARY}
-	${SDLMIXER_LIBRARY}
-	${HW_LINK_LIBS}
-	)
+set(HW_LINK_LIBS
+    ${QT_LIBRARIES}
+    ${SDL_LIBRARY}
+    ${SDLMIXER_LIBRARY}
+    ${HW_LINK_LIBS}
+    )
 
 if(WIN32 AND NOT UNIX)
-	if(NOT SDL_LIBRARY)
-		set(HW_LINK_LIBS ${HW_LINK_LIBS} SDL)
-	endif()
+    if(NOT SDL_LIBRARY)
+        set(HW_LINK_LIBS ${HW_LINK_LIBS} SDL)
+    endif()
 
-	set(	HW_LINK_LIBS
-		${HW_LINK_LIBS}
-		ole32
-		oleaut32
-		winspool
-		uuid
-		)
+    set(	HW_LINK_LIBS
+        ${HW_LINK_LIBS}
+        ole32
+        oleaut32
+        winspool
+        uuid
+        )
 endif()