Restore building shared libraries by default
Summary
Changes made earlier to the CMake build (e.g. 814a2441) inadvertently switched the setting of BUILD_SHARED_LIBS to be enabled only when the CMAKE_SOURCE_DIR differs from the PROJECT_SOURCE_DIR.
Version: 4.5.0 RC1
Steps to reproduce
I found this when building a conda package of libtiff, which stopped building shared libraries unexpectedly. It can be reproduced in any environment where PROJECT_SOURCE_DIR is set to the same value as CMAKE_SOURCE_DIR, shared libraries will not be generated if building with cmake and default values.
Platform: Windows x64, MSVC (2017 and 2019 tested), CMake 3.22.