CMakeLists.txt
branchspacecampaign
changeset 9382 f1464fa10c0b
parent 9349 8ec5cf11e85a
child 9353 3694d354289e
child 9381 90f9d8046a86
equal deleted inserted replaced
9346:1245c7636380 9382:f1464fa10c0b
    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