CMakeLists.txt 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. cmake_minimum_required(VERSION 3.19)
  2. project(spine)
  3. if(MSVC)
  4. message("MSCV detected")
  5. set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
  6. set (CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS}")
  7. else()
  8. set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wunused-value -Wno-c++11-long-long -Wno-variadic-macros -Werror -Wextra -pedantic -Wnonportable-include-path -Wshadow -std=c89")
  9. set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wunused-value -Wno-c++11-long-long -Wno-variadic-macros -Werror -Wextra -Wnon-virtual-dtor -pedantic -Wnonportable-include-path -Wshadow -std=c++11 -fno-exceptions -fno-rtti")
  10. endif()
  11. set(CMAKE_INSTALL_PREFIX "./")
  12. set(CMAKE_VERBOSE_MAKEFILE ON)
  13. set(SPINE_SFML FALSE CACHE BOOL FALSE)
  14. set(SPINE_COCOS2D_OBJC FALSE CACHE BOOL FALSE)
  15. set(SPINE_COCOS2D_X FALSE CACHE BOOL FALSE)
  16. if((${SPINE_SFML}) OR (${CMAKE_CURRENT_BINARY_DIR} MATCHES "spine-sfml"))
  17. add_subdirectory(spine-c)
  18. add_subdirectory(spine-sfml/c)
  19. add_subdirectory(spine-cpp)
  20. add_subdirectory(spine-sfml/cpp)
  21. endif()
  22. if((${SPINE_COCOS2D_OBJC}) OR (${CMAKE_CURRENT_BINARY_DIR} MATCHES "spine-cocos2d-objc"))
  23. if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
  24. add_subdirectory(spine-cocos2d-objc)
  25. endif()
  26. endif()
  27. if((${SPINE_COCOS2D_X}) OR (${CMAKE_CURRENT_BINARY_DIR} MATCHES "spine-cocos2dx"))
  28. add_subdirectory(spine-cocos2dx)
  29. endif()
  30. # add_subdirectory(spine-c/spine-c-unit-tests)
  31. add_subdirectory(spine-cpp/spine-cpp-unit-tests)