1 # taglib changed filenames to be a char/wchar struct on some platforms, need to check for it
2 macro (CHECK_TAGLIB_FILENAME TAGLIB_FILENAME_EXISTS TAGLIB_FILENAME_COMPLEX)
3 include (CheckCXXSourceCompiles)
4 set (CMAKE_REQUIRED_FLAGS ${TAGLIB_CFLAGS})
5 set (CMAKE_REQUIRED_INCLUDES ${TAGLIB_INCLUDES})
6 set (CMAKE_REQUIRED_LIBRARIES ${TAGLIB_LIBRARIES})
7 check_cxx_source_compiles(
11 TagLib::FileName fileName = \"char\";
13 }" ${TAGLIB_FILENAME_EXISTS})
14 if (${TAGLIB_FILENAME_EXISTS})
15 check_cxx_source_compiles(
19 TagLib::FileName fileName1(\"char\");
20 TagLib::FileName fileName2(L\"wchar\");
22 }" ${TAGLIB_FILENAME_COMPLEX})
23 endif (${TAGLIB_FILENAME_EXISTS})
24 endmacro (CHECK_TAGLIB_FILENAME)