Fix FindIconv cmake module to correctly compile the c++ test code
This commit is contained in:
@@ -35,6 +35,11 @@ find_package_handle_standard_args(Iconv REQUIRED_VARS ICONV_LIBRARIES ICONV_INCL
|
||||
# char** outbuf, size_t* outbytesleft);
|
||||
if(ICONV_FOUND)
|
||||
include(CheckCXXSourceCompiles)
|
||||
|
||||
# Set the parameters needed to compile the following code.
|
||||
set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIRS})
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
|
||||
|
||||
check_cxx_source_compiles("
|
||||
#include <iconv.h>
|
||||
int main(){
|
||||
|
||||
Reference in New Issue
Block a user