google / brunsli

Practical JPEG Repacker
MIT License
738 stars 51 forks source link

request: concerning building and installing brunsli with google-test (gtest) #146

Open Corin-EU opened 2 months ago

Corin-EU commented 2 months ago

This behavior is with brunsli latest source code r.cbbc39a

The CMake procedure should do a test to see if google-test is already installed on the system and is at least the minimum version required and use that instead of the source in contrib/gtest.

At the very least (if the above is too onerous) there should be a CMake flag ENABLE_SYSTEM_GTEST to allow the system installed version to be used instead of the version contained in contrib/gtest.

And most importantly, the install procedure should not attempt to install the google-test component if the google-test is already installed on the system otherwise the following will occur for those who manage "local" installed software with stow

/usr/local/bin/stow -d "/usr/local/stow/Graphics/Libraries" -t "/usr/local" "brunsli-r.cbbc39a" WARNING! stowing brunsli-r.cbbc39a would cause conflicts: * existing target is stowed to a different package: include/gtest/gtest-death-test.h => ../../stow/Development/Libraries/googletest-1.15.2/include/gtest/gtest-death-test.h ... [etc, etc, etc for all the other googletest files] ...

Thank you!