Added option to disable the installer

This commit is contained in:
Semphris 2022-04-15 17:33:32 -04:00 committed by Ryan C. Gordon
parent a0dfe220ff
commit 7305ee92a2
1 changed files with 5 additions and 0 deletions

View File

@ -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")