hedgewars/CMakeLists.txt
branchwebgl
changeset 8044 796f2653f21d
parent 8026 4a4f21070479
child 8096 453917e94e55
equal deleted inserted replaced
8041:ecb446b9b7d6 8044:796f2653f21d
     4 find_package(SDL_ttf)
     4 find_package(SDL_ttf)
     5 find_package(SDL_mixer)
     5 find_package(SDL_mixer)
     6 
     6 
     7 include(${CMAKE_MODULE_PATH}/FindSDL_Extras.cmake)
     7 include(${CMAKE_MODULE_PATH}/FindSDL_Extras.cmake)
     8 
     8 
     9 configure_file(${hedgewars_SOURCE_DIR}/hedgewars/config.inc.in ${CMAKE_CURRENT_BINARY_DIR}/config.inc)
     9 configure_file(${CMAKE_SOURCE_DIR}/hedgewars/config.inc.in ${CMAKE_CURRENT_BINARY_DIR}/config.inc)
    10 
    10 
    11 #SOURCE AND PROGRAMS SECTION
    11 #SOURCE AND PROGRAMS SECTION
    12 set(hwengine_project ${hedgewars_SOURCE_DIR}/hedgewars/hwengine.pas)
    12 set(hwengine_project ${CMAKE_SOURCE_DIR}/hedgewars/hwengine.pas)
    13 set(engine_output_name "hwengine")
    13 set(engine_output_name "hwengine")
    14 
    14 
    15 set(engine_sources
    15 set(engine_sources
    16     ${hwengine_project}
    16     ${hwengine_project}
    17     LuaPas.pas
    17     LuaPas.pas
    80     ${CMAKE_CURRENT_BINARY_DIR}/config.inc
    80     ${CMAKE_CURRENT_BINARY_DIR}/config.inc
    81     )
    81     )
    82 
    82 
    83 if(LIBENGINE)
    83 if(LIBENGINE)
    84     message(STATUS "Engine will be built as library (experimental)")
    84     message(STATUS "Engine will be built as library (experimental)")
    85     set(hwengine_project ${hedgewars_SOURCE_DIR}/hedgewars/hwLibrary.pas)
    85     set(hwengine_project ${CMAKE_SOURCE_DIR}/hedgewars/hwLibrary.pas)
    86     set(pascal_flags "-dHWLIBRARY" ${pascal_flags})
    86     set(pascal_flags "-dHWLIBRARY" ${pascal_flags})
    87 
    87 
    88     # create position independent code, only required for x68_64 builds, similar to -fPIC
    88     # create position independent code, only required for x68_64 builds, similar to -fPIC
    89     if(CMAKE_SIZEOF_VOID_P MATCHES "8")
    89     if(CMAKE_SIZEOF_VOID_P MATCHES "8")
    90         set(pascal_flags "-Cg" ${pascal_flags})
    90         set(pascal_flags "-Cg" ${pascal_flags})
   199     if(UNIX)
   199     if(UNIX)
   200         set(SAFE_BUILD_TOOL $(MAKE))
   200         set(SAFE_BUILD_TOOL $(MAKE))
   201     else()
   201     else()
   202         set(SAFE_BUILD_TOOL ${CMAKE_BUILD_TOOL})
   202         set(SAFE_BUILD_TOOL ${CMAKE_BUILD_TOOL})
   203     endif()
   203     endif()
   204     add_custom_target(ENGINECLEAN COMMAND ${SAFE_BUILD_TOOL} "clean" "${PROJECT_BINARY_DIR}" "${hedgewars_SOURCE_DIR}/hedgewars")
   204     add_custom_target(ENGINECLEAN COMMAND ${SAFE_BUILD_TOOL} "clean" "${PROJECT_BINARY_DIR}" "${CMAKE_SOURCE_DIR}/hedgewars")
   205 endif()
   205 endif()
   206 
   206 
   207 
   207 
   208 if(NOT NOVIDEOREC)
   208 if(NOT NOVIDEOREC)
   209     set(FFMPEG_FIND_QUIETLY true)
   209     set(FFMPEG_FIND_QUIETLY true)