block() find_package(Qt5 REQUIRED COMPONENTS Widgets) find_package(QMapLibre COMPONENTS Widgets REQUIRED) set(dir module/test_maplibre) file(GLOB_RECURSE srcs ${dir}/*.qrc ${dir}/*.c ${dir}/*.h ${dir}/*.cpp ${dir}/*.hpp) add_executable(test_maplibre ${srcs}) target_link_libraries(test_maplibre PRIVATE Qt5::Widgets QMapLibre::Widgets) target_compile_definitions(test_maplibre PRIVATE QT_MAPLIBRE_STATIC) target_compile_definitions(test_maplibre PRIVATE QT_MAPLIBRE_STATIC WIN32_LEAN_AND_MEAN NOMINMAX) if(WIN32) target_link_libraries(test_maplibre PRIVATE ws2_32) endif() if(MSVC) target_compile_options(test_maplibre PRIVATE /utf-8) endif() set_property(TARGET test_maplibre PROPERTY AUTOMOC ON) set_property(TARGET test_maplibre PROPERTY AUTOUIC ON) set_property(TARGET test_maplibre PROPERTY AUTORCC ON) endblock() #set(osgEarth_DIR "D:/ae/cached_external_library/vs2019_Debug_global/install/osgearth/lib/cmake/osgearth") block() set(rely osg_earth::osgearth) rcl_load_dependency_environment(${rely}) set(dir module/test_osg_earth) file(GLOB_RECURSE srcs ${dir}/*.qrc ${dir}/*.c ${dir}/*.h ${dir}/*.cpp ${dir}/*.hpp) add_executable(test_osg_earth ${srcs}) target_compile_definitions(test_osg_earth PRIVATE QT_MAPLIBRE_STATIC WIN32_LEAN_AND_MEAN NOMINMAX) find_package(osgEarth CONFIG REQUIRED) target_compile_definitions(test_osg_earth PRIVATE CPPHTTPLIB_OPENSSL_SUPPORT) target_link_libraries(test_osg_earth PRIVATE osgEarth::osgEarth) if(MSVC) target_compile_options(test_osg_earth PRIVATE /utf-8) endif() target_link_libraries(test_osg_earth PRIVATE Qt5::Widgets QMapLibre::Widgets) find_package(OpenSSL REQUIRED) target_link_libraries(test_osg_earth PRIVATE OpenSSL::SSL OpenSSL::Crypto) rcl_unload_dependency_environment(${rely}) endblock()