CMakeLists.txt
changeset 9349 8ec5cf11e85a
parent 9265 a0e7e7a1c3f8
child 9353 3694d354289e
child 9381 90f9d8046a86
equal deleted inserted replaced
9348:4ec6eff176a5 9349:8ec5cf11e85a
    31 option(ANDROID "Enable Android build (off)" OFF)
    31 option(ANDROID "Enable Android build (off)" OFF)
    32 
    32 
    33 option(MINIMAL_FLAGS "Respect system flags as much as possible (off)" OFF)
    33 option(MINIMAL_FLAGS "Respect system flags as much as possible (off)" OFF)
    34 option(NOAUTOUPDATE "Disable OS X Sparkle update checking (off)" OFF)
    34 option(NOAUTOUPDATE "Disable OS X Sparkle update checking (off)" OFF)
    35 
    35 
    36 set(FPFLAGS "" CACHE STRING "Additional Freepascal flags")
       
    37 set(GHFLAGS "" CACHE STRING "Additional Haskell flags")
    36 set(GHFLAGS "" CACHE STRING "Additional Haskell flags")
    38 if(UNIX AND NOT APPLE)
    37 if(UNIX AND NOT APPLE)
    39     set(DATA_INSTALL_DIR "share/hedgewars" CACHE STRING "Resource folder path")
    38     set(DATA_INSTALL_DIR "share/hedgewars" CACHE STRING "Resource folder path")
    40 endif()
    39 endif()
    41 
    40 
    91     unset(CMAKE_CXX_FLAGS_DEBUG)
    90     unset(CMAKE_CXX_FLAGS_DEBUG)
    92 endif()
    91 endif()
    93 
    92 
    94 
    93 
    95 #parse additional parameters
    94 #parse additional parameters
    96 if(FPFLAGS)
       
    97     add_flag_prepend(CMAKE_Pascal_FLAGS ${FPFLAGS})
       
    98 endif()
       
    99 if(GHFLAGS)
    95 if(GHFLAGS)
   100     if(${CMAKE_VERSION} VERSION_GREATER 2.6)
    96     if(${CMAKE_VERSION} VERSION_GREATER 2.6)
   101         separate_arguments(ghflags_parsed UNIX_COMMAND ${GHFLAGS})
    97         separate_arguments(ghflags_parsed UNIX_COMMAND ${GHFLAGS})
   102     else()
    98     else()
   103         message(${WARNING} "FPFLAGS and GHFLAGS are available only when using CMake >= 2.8")
    99         message(${WARNING} "GHFLAGS are available only when using CMake >= 2.8")
   104     endif()
   100     endif()
   105 endif()
   101 endif()
   106 
   102 
   107 list(APPEND haskell_flags ${ghflags_parsed} "-O2")
   103 list(APPEND haskell_flags ${ghflags_parsed} "-O2")
   108 
   104