CMakeOptions.txt 1.1 KB

123456789101112131415161718192021222324252627282930313233
  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_DETERMINISM "" OFF)
  11. option(PK_ENABLE_WATCHDOG "" OFF)
  12. option(PK_ENABLE_CUSTOM_SNAME "" OFF)
  13. option(PK_ENABLE_MIMALLOC "" OFF)
  14. # modules
  15. option(PK_BUILD_MODULE_LZ4 "" OFF)
  16. option(PK_BUILD_MODULE_CUTE_PNG "" OFF)
  17. option(PK_BUILD_MODULE_MSGPACK "" OFF)
  18. # PK_IS_MAIN determines whether the project is being used from root
  19. # or if it is added as a dependency (through add_subdirectory for example).
  20. if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
  21. set(PK_IS_MAIN TRUE)
  22. option(PK_BUILD_SHARED_LIB "Build shared library" OFF)
  23. option(PK_BUILD_STATIC_LIB "Build static library" OFF)
  24. else()
  25. set(PK_IS_MAIN FALSE)
  26. option(PK_BUILD_SHARED_LIB "Build shared library" OFF)
  27. option(PK_BUILD_STATIC_LIB "Build static library" ON)
  28. endif()
  29. option(PK_BUILD_STATIC_MAIN "Build static main" OFF)