Permalink
Browse files

Port to FreeBSD plus cmake fixes

- fix bug on case-sensitive filesystems (ZLIB) introduced in git e4fb4f4 (hg 9c129bbf5614)
- fail at configure time if required Qt modules are not found
  • Loading branch information...
1 parent b32440e commit e627fe6f955aef4cfd770b9c51ff6fea2a4cf95e @marco-m marco-m committed Dec 24, 2012
Showing with 5 additions and 8 deletions.
  1. +1 −5 CMakeLists.txt
  2. +2 −1 src/client/CMakeLists.txt
  3. +1 −1 src/server/CMakeLists.txt
  4. +1 −1 src/shared/CMakeLists.txt
View
@@ -41,11 +41,7 @@ include ( "config/Macros.cmake" )
set ( EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin )
set ( LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib )
-set ( QT_USE_QTNETWORK true )
-SET ( QT_USE_QTXML true )
-find_package ( Qt4 REQUIRED )
-
-find_package ( ZLib REQUIRED )
+find_package ( ZLIB REQUIRED )
### Output config.h ###
configure_file ( config/config.h.cmake ${CMAKE_BINARY_DIR}/config.h )
@@ -1,10 +1,11 @@
# src/client/CMakeLists.txt
+find_package(Qt4 REQUIRED QtCore QtNetwork QtXml QtGui)
include ( ${QT_USE_FILE} )
# Workaround the mess in ioapi.h. Mac OS X and BSDs don't need the "64" suffix for open()
# and friends.
-if (APPLE)
+if (APPLE OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
add_definitions(-DUSE_FILE32API) # Misleading macro name from ioapi.h
endif()
@@ -1,6 +1,6 @@
# src/server/CMakeLists.txt
-set (QT_DONT_USE_QTGUI true)
+find_package( Qt4 REQUIRED QtCore QtNetwork )
include ( ${QT_USE_FILE} )
set (
@@ -1,6 +1,6 @@
# src/shared/CMakeLists.txt
-set (QT_DONT_USE_QTGUI true)
+find_package(Qt4 REQUIRED QtCore QtNetwork)
include ( ${QT_USE_FILE} )
set (

0 comments on commit e627fe6

Please sign in to comment.