mirror of
https://github.com/QuasarApp/qca.git
synced 2025-05-13 02:59:34 +00:00
cmake: Make the check for QC_CERTSTORE_PATH actually work.
The previous code (present since the file was created) mixed different checks that required different expansions: * `if (ENV{foo})' will always evaluate to false even if $ENV{foo} is set, and may even be a CMake bug. * `if (EXISTS ...)' expects an actual string, not an variable that has not been expanded. It is not clear why the code expects QC_CERTSTORE_PATH to be an environment variable instead of a regular variable passed to CMake in the first place, but that can be changed in another commit. REVIEW: 122062
This commit is contained in:
parent
ffc53703ad
commit
19aeaedd54
@ -281,13 +281,13 @@ message(STATUS "Checking for certstore..")
|
||||
if( WIN32 )
|
||||
# USE BUILTIN
|
||||
else ( WIN32 )
|
||||
if ( ENV{QC_CERTSTORE_PATH} )
|
||||
if(EXISTS ENV{QC_CERTSTORE_PATH})
|
||||
if ( DEFINED ENV{QC_CERTSTORE_PATH} )
|
||||
if(EXISTS $ENV{QC_CERTSTORE_PATH})
|
||||
set( qca_CERTSTORE $ENV{QC_CERTSTORE_PATH})
|
||||
else(EXISTS ENV{QC_CERTSTORE_PATH})
|
||||
else(EXISTS $ENV{QC_CERTSTORE_PATH})
|
||||
# path to try
|
||||
endif(EXISTS ENV{QC_CERTSTORE_PATH})
|
||||
else( ENV{QC_CERTSTORE_PATH} )
|
||||
endif(EXISTS $ENV{QC_CERTSTORE_PATH})
|
||||
else( DEFINED ENV{QC_CERTSTORE_PATH} )
|
||||
set( toTry
|
||||
"/etc/ssl/certs/ca-certificates.crt"
|
||||
"/usr/share/ssl/cert.pem"
|
||||
@ -301,7 +301,7 @@ else ( WIN32 )
|
||||
set( qca_CERTSTORE ${_current_try})
|
||||
endif(EXISTS ${_current_try})
|
||||
endforeach (_current_try)
|
||||
endif( ENV{QC_CERTSTORE_PATH} )
|
||||
endif( DEFINED ENV{QC_CERTSTORE_PATH} )
|
||||
endif(WIN32)
|
||||
|
||||
if (qca_CERTSTORE)
|
||||
|
Loading…
x
Reference in New Issue
Block a user