CMAKE_MINIMUM_REQUIRED (VERSION 2.6) LIST( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMake ) FIND_PACKAGE (SDL REQUIRED) FIND_PACKAGE (SDL_mixer REQUIRED) FIND_PACKAGE (SDL_net REQUIRED) FIND_PACKAGE (OpenGL REQUIRED) FIND_PACKAGE (GLEW REQUIRED) FIND_PACKAGE (PNG REQUIRED) FIND_PACKAGE (FreeType2 REQUIRED) FIND_PACKAGE (Boost COMPONENTS filesystem REQUIRED) ADD_SUBDIRECTORY ( libraries ) SET ( ENGINE_SRCS CameraBase.cc ControllerBase.cc EntityBase.cc EntityFactoryBase.cc EventBase.cc GameEntityBase.cc ModelBase.cc OverlayBase.cc PhysicsBase.cc PhysicsEntityBase.cc SoundBase.cc ViewBase.cc Commands.cc DrawingsGL.cc EngineCommands.cc Variables.cc VariablesCommands.cc SimpleConsoleOverlay.cc Sprite.cc OBJModel.cc IMGUIControls.cc Engine.cc Logging.cc EnumStrings.cc Utils.cc ) INCLUDE_DIRECTORIES ( ${Boost_INCLUDE_DIRS} ${SDLMIXER_INCLUDE_DIRS} ${SDLNET_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR} libraries/mathlib/ libraries/coll2d/include libraries/oglft/liboglft libraries/sha2/ ${FREETYPE2_INCLUDE_DIR} ${GLEW_INCLUDE_DIR} ) ADD_LIBRARY ( Engine STATIC ${ENGINE_SRCS} ) TARGET_LINK_LIBRARIES ( Engine ${SDL_LIBRARY} ${SDLMIXER_LIBRARY} ${SDLNET_LIBRARY} ${OPENGL_LIBRARIES} ${GLEW_LIBRARIES} ${PNG_LIBRARIES} ${Boost_LIBRARIES} mathlib oglft coll2d sha2 ) ADD_SUBDIRECTORY ( tests )