Use target gflags instead of old VARIABLES

This commit is contained in:
Mizux 2018-01-04 13:02:02 +01:00 committed by GitHub
parent a92e1d95c5
commit 63871d3e29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,8 +34,8 @@ int main(int argc, char**argv)
try_compile (${VARIABLE}
"${CMAKE_BINARY_DIR}" "${_check_file}"
COMPILE_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}" -DGFLAGS_NAMESPACE=${_namespace}
LINK_LIBRARIES "${gflags_LIBRARIES}"
CMAKE_FLAGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} "-DINCLUDE_DIRECTORIES:STRING=${gflags_INCLUDE_DIR}"
LINK_LIBRARIES gflags
CMAKE_FLAGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
OUTPUT_VARIABLE OUTPUT)
if (${VARIABLE})