project_files/hwc/CMakeLists.txt
branchui-scaling
changeset 15663 d92eeb468dad
parent 15362 c8f37fc9c266
child 15555 107170c05bac
equal deleted inserted replaced
15283:c4fd2813b127 15663:d92eeb468dad
     1 #the usual set of dependencies
     1 #the usual set of dependencies
     2 find_package(OpenGL REQUIRED)
     2 find_package(OpenGL REQUIRED)
     3 find_package(GLEW REQUIRED)
       
     4 find_package(SDL2 REQUIRED)
     3 find_package(SDL2 REQUIRED)
     5 find_package(SDL2_mixer 2 REQUIRED)
     4 find_package(SDL2_mixer 2 REQUIRED)
     6 find_package(SDL2_net 2 REQUIRED)
     5 find_package(SDL2_net 2 REQUIRED)
     7 find_package(SDL2_image 2 REQUIRED)
     6 find_package(SDL2_image 2 REQUIRED)
     8 find_package(SDL2_ttf 2 REQUIRED)
     7 find_package(SDL2_ttf 2 REQUIRED)
     9 
     8 
    10 #compile our rtl implementation
     9 #compile our rtl implementation
    11 include_directories(${GLEW_INCLUDE_DIR})
       
    12 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/rtl)
    10 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/rtl)
    13 include_directories(${PHYSFS_INCLUDE_DIR})
    11 include_directories(${PHYSFS_INCLUDE_DIR})
    14 include_directories(${PHYSLAYER_INCLUDE_DIR})
    12 include_directories(${PHYSLAYER_INCLUDE_DIR})
    15 include_directories(${LUA_INCLUDE_DIR})
    13 include_directories(${LUA_INCLUDE_DIR})
    16 include_directories(${SDL2_INCLUDE_DIRS})
    14 include_directories(${SDL2_INCLUDE_DIRS})
    72     set(pas2c_args ${pas2c_args} -d HWLIBRARY)
    70     set(pas2c_args ${pas2c_args} -d HWLIBRARY)
    73 endif()
    71 endif()
    74 if(GL2)
    72 if(GL2)
    75     set(pas2c_args ${pas2c_args} -d GL2)
    73     set(pas2c_args ${pas2c_args} -d GL2)
    76 endif()
    74 endif()
       
    75 if(APPLE)
       
    76     set(pas2c_args ${pas2c_args} -d DARWIN)
       
    77 endif()
    77 
    78 
    78 if(LIBAV_FOUND)
    79 if(LIBAV_FOUND)
    79     add_subdirectory(${CMAKE_SOURCE_DIR}/hedgewars/avwrapper ${CMAKE_CURRENT_BINARY_DIR}/avwrapper)
    80     add_subdirectory(${CMAKE_SOURCE_DIR}/hedgewars/avwrapper ${CMAKE_CURRENT_BINARY_DIR}/avwrapper)
    80     list(APPEND HW_LINK_LIBS avwrapper)
    81     list(APPEND HW_LINK_LIBS avwrapper)
    81     set(pas2c_args ${pas2c_args} -d USE_VIDEO_RECORDING)
    82     set(pas2c_args ${pas2c_args} -d USE_VIDEO_RECORDING)
   113                                 ${SDL2_LIBRARY}
   114                                 ${SDL2_LIBRARY}
   114                                 ${SDL2_MIXER_LIBRARIES}
   115                                 ${SDL2_MIXER_LIBRARIES}
   115                                 ${SDL2_NET_LIBRARIES}
   116                                 ${SDL2_NET_LIBRARIES}
   116                                 ${SDL2_IMAGE_LIBRARIES}
   117                                 ${SDL2_IMAGE_LIBRARIES}
   117                                 ${SDL2_TTF_LIBRARIES}
   118                                 ${SDL2_TTF_LIBRARIES}
   118                                 ${GLEW_LIBRARY}
       
   119                                 physfs
   119                                 physfs
   120                                 physlayer
   120                                 physlayer
   121                                 m
   121                                 m
   122                                 ${HW_LINK_LIBS}
   122                                 ${HW_LINK_LIBS}
   123                                 #TODO: add other libraries
   123                                 #TODO: add other libraries