1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 06:39:49 +00:00
OpenMW/CMakeLists.txt
Ardekantur ad1e9e7078 boost::filesystem cross-platform config file check
* introduces the use of the Boost.System and Boost.Filesystem libraries,
  which must be built and linked to rather than just compiled into
  OpenMW. May be a pain in the neck to get working on other platforms,
  but once it works, we have all of Boost to work with.
2010-06-04 21:44:05 -04:00

34 lines
1.0 KiB
CMake

project(OpenMW)
# We probably support older versions than this.
cmake_minimum_required(VERSION 2.6)
# Add path for CMake scripts
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/)
# Local files
set(BSA bsa/bsa_archive.cpp bsa/bsa_file.cpp)
set(NIF nif/nif_file.cpp nifogre/ogre_nif_loader.cpp)
set(TOOLS tools/stringops.cpp tools/fileops.cpp)
set(MANGLE_VFS mangle/vfs/servers/ogre_vfs.cpp)
set(OGRE ogre/renderer.cpp)
set(GAME game/main.cpp game/esm_store/store.cpp game/cell_store.cpp)
# Platform specific
if (WIN32)
set(PLATFORM_INCLUDE_DIR "platform")
else (WIN32)
set(PLATFORM_INCLUDE_DIR "")
endif (WIN32)
# Dependencies
find_package(OGRE REQUIRED)
find_package(Boost REQUIRED COMPONENTS system filesystem)
include_directories("." ${OGRE_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${PLATFORM_INCLUDE_DIR})
link_directories(${Boost_LIBRARY_DIRS} ${OGRE_LIB_DIR})
# Main executable
add_executable(openmw ${BSA} ${TOOLS} ${OGRE} ${GAME})
target_link_libraries(openmw ${OGRE_LIBRARIES})
target_link_libraries(openmw ${Boost_LIBRARIES})