"I apologize, I had sent this message with email 
[email protected]<mailto:[email protected]> by mistake".

Hello,

We're trying to integrate PROJ in an opensource project using CMake.

Following strictly this page :
https://proj.org/en/9.3/development/cmake.html

CMake does find PROJ but we fall on this error message :

"CMake Error: File C:/projects/poc-ign-geopf/cmake/proj_config.cmake.in does 
not exist.
CMake Error at C:/dev/PROJ/cmake/ProjConfig.cmake:54 (configure_file):
  configure_file Problem configuring file"

Are we missing something ?

We attach the CMakeLists.txt file to this mail.

If necessary, we can push this project on an experimental branch, knowing that 
it depends on Qt5.15.2 MSVC2019.

Thanks in advance for your help.
Kind regards,
Jean.





Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à 
l'intention exclusive des destinataires et les informations qui y figurent sont 
strictement confidentielles. Toute utilisation de ce Message non conforme à sa 
destination, toute diffusion ou toute publication totale ou partielle, est 
interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le 
copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si 
vous avez reçu ce Message par erreur, merci de le supprimer de votre système, 
ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support 
que ce soit. Nous vous remercions également d'en avertir immédiatement 
l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie 
électronique arrivent en temps utile, sont sécurisées ou dénuées de toute 
erreur ou virus.
____________________________________________________

This message and any attachments (the 'Message') are intended solely for the 
addressees. The information contained in this Message is confidential. Any use 
of information contained in this Message not in accord with its purpose, any 
dissemination or disclosure, either whole or partial, is prohibited except 
formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any 
part of it. If you have received this message in error, please delete it and 
all copies from your system and notify the sender immediately by return message.

E-mail communication cannot be guaranteed to be timely secure, error or 
virus-free.
cmake_minimum_required(VERSION 3.14)

project(poc-ign-geopf VERSION 0.1 LANGUAGES CXX)

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(PROJ_DIR "C:/dev/PROJ/cmake")

find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Quick Widgets WebChannel 
WebSockets WebView Xml)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Quick Widgets 
WebChannel WebSockets WebView Xml)
# find_package(PROJ REQUIRED CONFIG)

set(PROJECT_SOURCES
        main.cpp
        qml.qrc
)

if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
    qt_add_executable(poc-ign-geopf
        MANUAL_FINALIZATION
        ${PROJECT_SOURCES}
    )
# Define target properties for Android with Qt 6 as:
#    set_property(TARGET poc-ign-geopf APPEND PROPERTY 
QT_ANDROID_PACKAGE_SOURCE_DIR
#                 ${CMAKE_CURRENT_SOURCE_DIR}/android)
# For more information, see 
https://doc.qt.io/qt-6/qt-add-executable.html#target-creation
else()
    if(ANDROID)
        add_library(poc-ign-geopf SHARED
            ${PROJECT_SOURCES}
        )
# Define properties for Android with Qt 5 after find_package() calls as:
#    set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
    else()
        add_executable(poc-ign-geopf
          ${PROJECT_SOURCES}
          TYGeographicData.h
          TYIGNGeoProvider.h TYIGNGeoProvider.cpp
          TYWebSocketTransport.h TYWebSocketTransport.cpp
          TYMainWindow.h TYMainWindow.cpp
          TYGeographicData.cpp
          TYIGNLevelCurvesParser.h TYIGNLevelCurvesParser.cpp
          TYIGNLevelCurvesParser.cpp TYIGNLevelCurvesParser.h
         # imagedownloader.h
        )
    endif()
endif()

target_link_libraries(poc-ign-geopf
  PRIVATE
#  PROJ::proj
  Qt${QT_VERSION_MAJOR}::Core
  Qt${QT_VERSION_MAJOR}::Quick
  Qt${QT_VERSION_MAJOR}::Widgets
  Qt${QT_VERSION_MAJOR}::WebChannel
  Qt${QT_VERSION_MAJOR}::WebSockets
  Qt${QT_VERSION_MAJOR}::WebView
  Qt${QT_VERSION_MAJOR}::Xml)

# Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1.
# If you are developing for iOS or macOS you should consider setting an
# explicit, fixed bundle identifier manually though.
if(${QT_VERSION} VERSION_LESS 6.1.0)
  set(BUNDLE_ID_OPTION MACOSX_BUNDLE_GUI_IDENTIFIER com.example.poc-ign-geopf)
endif()
set_target_properties(poc-ign-geopf PROPERTIES
    ${BUNDLE_ID_OPTION}
    MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
    MACOSX_BUNDLE_SHORT_VERSION_STRING 
${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
    MACOSX_BUNDLE TRUE
    WIN32_EXECUTABLE TRUE
)

include(GNUInstallDirs)
install(TARGETS poc-ign-geopf
    BUNDLE DESTINATION .
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})

if(QT_VERSION_MAJOR EQUAL 6)
    qt_import_qml_plugins(poc-ign-geopf)
    qt_finalize_executable(poc-ign-geopf)
endif()
_______________________________________________
PROJ mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/proj

Reply via email to