CMakeOptions.txt 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # use UNITY_BUILD if CMake version >= 3.16
  2. if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16")
  3. option(PK_BUILD_WITH_UNITY "" TRUE)
  4. else()
  5. option(PK_BUILD_WITH_UNITY "" FALSE)
  6. endif()
  7. # system features
  8. option(PK_ENABLE_OS "" ON)
  9. option(PK_ENABLE_THREADS "" ON)
  10. option(PK_ENABLE_DLL "" ON)
  11. option(PK_ENABLE_DETERMINISM "" ON)
  12. option(PK_ENABLE_WATCHDOG "" OFF)
  13. option(PK_ENABLE_CUSTOM_SNAME "" OFF)
  14. option(PK_ENABLE_MIMALLOC "" OFF)
  15. option(PK_BUILD_MATH_TESTS "Build deterministic binary64 kernel tests" OFF)
  16. # modules
  17. option(PK_BUILD_MODULE_LZ4 "" OFF)
  18. option(PK_BUILD_MODULE_CUTE_PNG "" OFF)
  19. option(PK_BUILD_MODULE_MSGPACK "" OFF)
  20. option(PK_BUILD_MODULE_PERIPHERY "" OFF)
  21. # PK_IS_MAIN determines whether the project is being used from root
  22. # or if it is added as a dependency (through add_subdirectory for example).
  23. if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
  24. set(PK_IS_MAIN TRUE)
  25. option(PK_BUILD_SHARED_LIB "Build shared library" OFF)
  26. option(PK_BUILD_STATIC_LIB "Build static library" OFF)
  27. else()
  28. set(PK_IS_MAIN FALSE)
  29. option(PK_BUILD_SHARED_LIB "Build shared library" OFF)
  30. option(PK_BUILD_STATIC_LIB "Build static library" ON)
  31. endif()
  32. option(PK_BUILD_STATIC_MAIN "Build static main" OFF)