CMakeLists.txt 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. project (Atomic)
  2. cmake_minimum_required (VERSION 2.8)
  3. set (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake/Modules)
  4. add_definitions( -DATOMIC_API= -DATOMIC_STATIC_DEFINE -DATOMIC_ATOMIC2D -DATOMIC_LOGGING)
  5. add_definitions( -DATOMIC_DEV_BUILD )
  6. # this is here as QtCreator is having trouble picking up #include <Atomic/*> without it
  7. include_directories(${CMAKE_SOURCE_DIR}/Source ${CMAKE_SOURCE_DIR}/Source/AtomicEditor/Source)
  8. set (ATOMIC_LINK_LIBRARIES Atomic Box2D Duktape TurboBadger FreeType JO LZ4 PugiXml STB)
  9. if (NOT ATOMIC_BUILD_2D)
  10. add_definitions( -DATOMIC_PHYSICS -DATOMIC_3D)
  11. set (ATOMIC_LINK_LIBRARIES ${ATOMIC_LINK_LIBRARIES} Bullet StanHull)
  12. endif()
  13. if (NOT EMSCRIPTEN)
  14. add_definitions( -DATOMIC_NETWORK)
  15. set (ATOMIC_LINK_LIBRARIES ${ATOMIC_LINK_LIBRARIES} SDL Civetweb Recast Detour kNet )
  16. endif()
  17. if (MSVC)
  18. include(AtomicWindows)
  19. elseif(APPLE)
  20. if (IOS)
  21. include(AtomicIOS)
  22. else()
  23. include(AtomicMac)
  24. endif()
  25. elseif(LINUX)
  26. include(AtomicLinux)
  27. elseif(ANDROID)
  28. include(AtomicAndroid)
  29. elseif(EMSCRIPTEN)
  30. include(AtomicWeb)
  31. endif()
  32. add_subdirectory(Source)