CMakeLists.txt 1.4 KB

12345678910111213141516171819202122232425262728293031
  1. cmake_minimum_required (VERSION 3.12.0)
  2. project (bsf)
  3. set (BSF_SOURCE_DIR ${PROJECT_SOURCE_DIR}/Source)
  4. set (APP_ROOT_DIR ${PROJECT_SOURCE_DIR})
  5. set (BS_IS_BANSHEE3D 0)
  6. # Default install dir
  7. if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
  8. if(LINUX)
  9. set(CMAKE_INSTALL_PREFIX /usr/local/opt/bsf CACHE PATH "..." FORCE)
  10. endif()
  11. endif()
  12. include(Source/CMake/Properties.cmake)
  13. include(Source/CMake/FindPackageOrBuild.cmake)
  14. include(Source/CMake/HelperMethods.cmake)
  15. add_subdirectory(Source)
  16. # Options
  17. set(SCRIPT_API "None" CACHE STRING "Which scripting API/language to use, if any. If no scripting API is chosen only native C++ bsf core will be built. If a scripting API is chosen, then a separate scripting layer on top of the core will be included in the build as well.")
  18. set_property(CACHE SCRIPT_API PROPERTY STRINGS "None" "C#")
  19. set(SCRIPT_BINDING_GENERATION OFF CACHE BOOL "If true, script binding generation will be supported through a specialized build target. Enable this if you plan on modifying the scripting API. Requires the SBGen tool dependency. Only relevant if you have selected a SCRIPT_API other than \"None\".")
  20. set(BSF_STRIP_DEBUG_INFO ON CACHE BOOL "If true debug info will be stripped into a separate file in release builds.")
  21. set(BSF_ENABLE_EXCEPTIONS OFF CACHE BOOL "If true C++ exceptions will be enabled when compiling.")
  22. set(BSF_ENABLE_RTTI OFF CACHE BOOL "If true C++ RTTI will be enabled when compiling.")