hedgewars/CMakeLists.txt
branchwebgl
changeset 9244 bb95e351270c
parent 9236 ddd675825672
child 9521 8054d9d775fd
equal deleted inserted replaced
9242:c07f341adad9 9244:bb95e351270c
   114         else()
   114         else()
   115             message(FATAL_ERROR "Unknown architecture present in CMAKE_OSX_ARCHITECTURES (${CMAKE_OSX_ARCHITECTURES})")
   115             message(FATAL_ERROR "Unknown architecture present in CMAKE_OSX_ARCHITECTURES (${CMAKE_OSX_ARCHITECTURES})")
   116         endif()
   116         endif()
   117         list(LENGTH CMAKE_OSX_ARCHITECTURES num_of_archs)
   117         list(LENGTH CMAKE_OSX_ARCHITECTURES num_of_archs)
   118         if(num_of_archs GREATER 1)
   118         if(num_of_archs GREATER 1)
   119             message(${WARNING} "Only one architecture in CMAKE_OSX_ARCHITECTURES is currently supported, picking the first one")
   119             message("*** Only one architecture in CMAKE_OSX_ARCHITECTURES is currently supported, picking the first one ***")
   120         endif()
   120         endif()
   121     elseif(CMAKE_SIZEOF_VOID_P MATCHES "8")
   121     elseif(CMAKE_SIZEOF_VOID_P MATCHES "8")
   122         #if that variable is not set check if we are on x86_64 and if so force it, else use default
   122         #if that variable is not set check if we are on x86_64 and if so force it, else use default
   123         add_flag_prepend(CMAKE_Pascal_FLAGS -Px86_64)
   123         add_flag_prepend(CMAKE_Pascal_FLAGS -Px86_64)
   124     endif()
   124     endif()
   125 
   125 
   126     #on OSX we need to provide the SDL_main() function when building as executable
   126     #on OSX we need to provide the SDL_main() function when building as executable
   127     if(NOT BUILD_ENGINE_LIBRARY)
   127     if(NOT BUILD_ENGINE_LIBRARY)
   128         add_subdirectory(sdlmain)
       
   129         list(APPEND HW_LINK_LIBS SDLmain)
   128         list(APPEND HW_LINK_LIBS SDLmain)
   130         add_flag_append(CMAKE_Pascal_FLAGS -Fl${LIBRARY_OUTPUT_PATH})
   129         add_flag_append(CMAKE_Pascal_FLAGS -Fl${LIBRARY_OUTPUT_PATH})
   131     endif()
   130     endif()
   132 
   131 
   133     #when sysroot is set, make sure that fpc picks it
   132     #when sysroot is set, make sure that fpc picks it