hedgewars/CMakeLists.txt
branchcmake_pascal
changeset 8811 dcdfcddf37ee
parent 8804 32bc222ddca6
child 8813 a932b10fc1d0
equal deleted inserted replaced
8809:8ce66f1106f1 8811:dcdfcddf37ee
   138 
   138 
   139     if(powerpc_build)
   139     if(powerpc_build)
   140         set(powerpc_build "powerpc")
   140         set(powerpc_build "powerpc")
   141     endif()
   141     endif()
   142 
   142 
   143 
       
   144     #on OSX we need to provide the SDL_main() function when building as executable
   143     #on OSX we need to provide the SDL_main() function when building as executable
   145     if(NOT ${BUILD_ENGINE_LIBRARY})
   144     if(NOT ${BUILD_ENGINE_LIBRARY})
   146         add_subdirectory(sdlmain)
   145         add_subdirectory(sdlmain)
   147         add_flag_append(CMAKE_Pascal_FLAGS -Fl${LIBRARY_OUTPUT_PATH})
   146         add_flag_append(CMAKE_Pascal_FLAGS -Fl${LIBRARY_OUTPUT_PATH})
   148     endif()
   147     endif()
   149 endif(APPLE)
   148 endif(APPLE)
   150 
   149 
   151 
   150 
   152 if(${FFMPEG_FOUND})
   151 if(${FFMPEG_FOUND})
   153     # TODO: this check is only for SDL < 2
   152     add_subdirectory(avwrapper)
   154     # fpc will take care of linking but we need to have this library installed
       
   155     find_package(GLUT REQUIRED)
       
   156 
       
   157     #TODO: convert avwrapper to .pas unit so we can skip this step
       
   158     include_directories(${FFMPEG_INCLUDE_DIR})
       
   159     if(WIN32)
       
   160         # there are some problems with linking our avwrapper as static lib, so link it as shared
       
   161         add_library(avwrapper SHARED avwrapper.c)
       
   162         target_link_libraries(avwrapper ${FFMPEG_LIBRARIES})
       
   163         install(PROGRAMS "${LIBRARY_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}avwrapper${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION ${target_library_install_dir})
       
   164     else()
       
   165         add_library(avwrapper STATIC avwrapper.c)
       
   166     endif()
       
   167     add_definitions(-dUSE_VIDEO_RECORDING)
   153     add_definitions(-dUSE_VIDEO_RECORDING)
   168     add_flag_append(CMAKE_Pascal_FLAGS -Fl${LIBRARY_OUTPUT_PATH})
   154     add_flag_append(CMAKE_Pascal_FLAGS -Fl${LIBRARY_OUTPUT_PATH})
   169 endif()
   155 endif()
   170 
   156 
   171 find_package_or_disable_msg(PNG NOPNG "Screenshots will be saved in BMP")
   157 find_package_or_disable_msg(PNG NOPNG "Screenshots will be saved in BMP")