QTfrontend/CMakeLists.txt
changeset 8333 416cb5e5a405
parent 8323 ab0b618bdf13
child 8335 bc948db1273a
equal deleted inserted replaced
8331:217c3fd72a2d 8333:416cb5e5a405
    39 if(UNIX)
    39 if(UNIX)
    40     # HACK: in freebsd cannot find iconv.h included via SDL.h
    40     # HACK: in freebsd cannot find iconv.h included via SDL.h
    41     include_directories("/usr/local/include")
    41     include_directories("/usr/local/include")
    42 endif(UNIX)
    42 endif(UNIX)
    43 
    43 
    44 #directory for resources, relative to the one above on certain platforms/configurations
    44 #directory for resources, relative to bindir unless absolute path is used
    45 if(DEFINED DATA_INSTALL_DIR OR WIN32 OR APPLE)
    45 string(FIND "${SHAREPATH}" "/" sharepath_is_absolute)
       
    46 if(${sharepath_is_absolute} EQUAL 0)
    46     set(HEDGEWARS_DATADIR ${SHAREPATH})
    47     set(HEDGEWARS_DATADIR ${SHAREPATH})
    47 else()
    48 else()
    48     set(HEDGEWARS_DATADIR ${CMAKE_INSTALL_PREFIX}/${SHAREPATH}/)
    49     set(HEDGEWARS_DATADIR ${CMAKE_INSTALL_PREFIX}/${SHAREPATH})
    49 endif()
    50 endif()
    50 
    51 
    51 #only the cocoa version of qt supports building 64 bit apps
    52 #only the cocoa version of qt supports building 64 bit apps
    52 if(APPLE AND (CMAKE_OSX_ARCHITECTURES MATCHES "x86_64*") AND (NOT QT_MAC_USE_COCOA))
    53 if(APPLE AND (CMAKE_OSX_ARCHITECTURES MATCHES "x86_64*") AND (NOT QT_MAC_USE_COCOA))
    53     message(FATAL_ERROR "Building the 64 bit version of Hedgewars *requires* the Cocoa variant of QT on Mac OS X")
    54     message(FATAL_ERROR "Building the 64 bit version of Hedgewars *requires* the Cocoa variant of QT on Mac OS X")