use the correct CMake variable for static builds