Warning, /frameworks/syntax-highlighting/src/indexer/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # when cross compiling, use either the executable offered or try to cross-compile it in place
0002 
0003 if(CMAKE_CROSSCOMPILING AND KATEHIGHLIGHTINGINDEXER_EXECUTABLE)
0004     add_executable(katehighlightingindexer IMPORTED GLOBAL)
0005     set_target_properties(katehighlightingindexer PROPERTIES IMPORTED_LOCATION ${KATEHIGHLIGHTINGINDEXER_EXECUTABLE})
0006 elseif(CMAKE_CROSSCOMPILING)
0007     if (NOT KF5_HOST_TOOLING)
0008         message(FATAL_ERROR "Please provide a prefix with a native Qt build and pass -DKF5_HOST_TOOLING=path")
0009     endif()
0010 
0011     # search native tooling prefix
0012     string(FIND ${KF5_HOST_TOOLING} /lib idx)
0013     string(SUBSTRING ${KF5_HOST_TOOLING} 0 ${idx} NATIVE_PREFIX)
0014     message(STATUS "Building katehighlightingindexer against ${NATIVE_PREFIX}")
0015 
0016     include(ExternalProject)
0017     ExternalProject_Add(native_katehighlightingindexer
0018                         SOURCE_DIR ${CMAKE_SOURCE_DIR}
0019                         CMAKE_ARGS -DKSYNTAXHIGHLIGHTING_USE_GUI=OFF
0020                             -DECM_DIR=${ECM_DIR} -DCMAKE_PREFIX_PATH=${NATIVE_PREFIX}
0021                             -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}
0022                             -DQT_MAJOR_VERSION=${QT_MAJOR_VERSION}
0023                         INSTALL_COMMAND ""
0024                         BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/native_katehighlightingindexer-prefix/src/native_katehighlightingindexer-build/bin/katehighlightingindexer
0025                     )
0026     add_executable(katehighlightingindexer IMPORTED GLOBAL)
0027     add_dependencies(katehighlightingindexer native_katehighlightingindexer)
0028     set_target_properties(katehighlightingindexer PROPERTIES IMPORTED_LOCATION
0029         ${CMAKE_CURRENT_BINARY_DIR}/native_katehighlightingindexer-prefix/src/native_katehighlightingindexer-build/bin/katehighlightingindexer)
0030 else()
0031     # host build
0032     add_executable(katehighlightingindexer katehighlightingindexer.cpp ../lib/worddelimiters.cpp)
0033     ecm_mark_nongui_executable(katehighlightingindexer)
0034     if(Qt5XmlPatterns_FOUND AND NOT ECM_ENABLE_SANITIZERS)
0035         target_link_libraries(katehighlightingindexer Qt5::XmlPatterns)
0036     else()
0037         target_link_libraries(katehighlightingindexer Qt${QT_MAJOR_VERSION}::Core)
0038     endif()
0039 endif()