29 lines
829 B
CMake
29 lines
829 B
CMake
set(dir ${CMAKE_CURRENT_LIST_DIR}/src)
|
|
|
|
|
|
|
|
|
|
find_package(Qt5 REQUIRED COMPONENTS Widgets)
|
|
find_package(QMapLibre COMPONENTS Widgets REQUIRED)
|
|
|
|
|
|
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) |