CMakeLists.txt
changeset 15977 3199bbfeba31
parent 15910 f9e1a7c8a658
child 15982 28b692ef6f15
equal deleted inserted replaced
15976:69479ac8f4c8 15977:3199bbfeba31
   175     list(APPEND haskell_flags "-Wall"       # all warnings
   175     list(APPEND haskell_flags "-Wall"       # all warnings
   176                               "-debug"      # debug mode
   176                               "-debug"      # debug mode
   177                               "-fno-warn-unused-do-bind"
   177                               "-fno-warn-unused-do-bind"
   178                               "-O0"
   178                               "-O0"
   179                               )
   179                               )
       
   180     set(USE_DEBUG_LIBRARIES TRUE)
   180 else()
   181 else()
   181     list(APPEND haskell_flags "-w" # no warnings
   182     list(APPEND haskell_flags "-w" # no warnings
   182                               "-O2"
   183                               "-O2"
   183                               )
   184                               )
   184 endif()
   185 endif()
   247 endif()
   248 endif()
   248 
   249 
   249 if(PHYSFS_LIBRARY AND PHYSFS_INCLUDE_DIR)
   250 if(PHYSFS_LIBRARY AND PHYSFS_INCLUDE_DIR)
   250     #use an IMPORTED tharget so that we can just use 'physfs' to link
   251     #use an IMPORTED tharget so that we can just use 'physfs' to link
   251     add_library(physfs UNKNOWN IMPORTED)
   252     add_library(physfs UNKNOWN IMPORTED)
   252     set_target_properties(physfs PROPERTIES IMPORTED_LOCATION ${PHYSFS_LIBRARY})
   253     if (DEFINED PHYSFS_LIBRARY_RELEASE)
       
   254         if (${USE_DEBUG_LIBRARIES})
       
   255             set_target_properties(physfs PROPERTIES IMPORTED_LOCATION ${PHYSFS_LIBRARY_DEBUG})
       
   256         else()    
       
   257             set_target_properties(physfs PROPERTIES IMPORTED_LOCATION ${PHYSFS_LIBRARY_RELEASE})
       
   258         endif()
       
   259     else()
       
   260         set_target_properties(physfs PROPERTIES IMPORTED_LOCATION ${PHYSFS_LIBRARY})
       
   261     endif()
   253 else()
   262 else()
   254     message(FATAL_ERROR "Missing PhysFS! Install PhysFS to fix this.")
   263     message(FATAL_ERROR "Missing PhysFS! Install PhysFS to fix this.")
   255 endif()
   264 endif()
   256 
   265 
   257 find_package_or_disable_msg(LIBAV NOVIDEOREC "Video recording will not be built")
   266 find_package_or_disable_msg(LIBAV NOVIDEOREC "Video recording will not be built")