diff --git a/CMakeLists.txt b/CMakeLists.txt index 6350ff5..e0c2e7c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -216,6 +216,9 @@ if(PHYSFS_BUILD_TEST) set(PHYSFS_INSTALL_TARGETS ${PHYSFS_INSTALL_TARGETS} ";test_physfs") endif() +option(PHYSFS_DISABLE_INSTALL "Disable installing PhysFS" OFF) +if(NOT PHYSFS_DISABLE_INSTALL) + install(TARGETS ${PHYSFS_INSTALL_TARGETS} EXPORT PhysFSExport RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} @@ -290,6 +293,8 @@ if(NOT MSVC) ) endif() +endif(NOT PHYSFS_DISABLE_INSTALL) + macro(message_bool_option _NAME _VALUE) if(${_VALUE}) message(STATUS " ${_NAME}: enabled")