Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Creator Cmake "No executable specified" (CuteLyst)

Qt Creator Cmake "No executable specified" (CuteLyst)

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
2 Posts 2 Posters 971 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    Ucn_
    wrote on last edited by
    #1

    Hello. I am trying to work with Cutelyst on Qt Creator. I am able to load the CMakeLists.txt with the settings to find my source files. It opens on Qt creator and with extra steps I fixed some issues "Qt::Core" and "Cutelyste::Core" not found. Now I am stuck on the build step. I do not know how to load the CMakeLists.txt (CMake file to build application).

    CMakeLists.txt Settings:

    file(GLOB_RECURSE ServerREST2_SRCS *.cpp *.h)
    
    set(ServerREST2_SRCS
        ${ServerREST2_SRCS}
        ${TEMPLATES_SRC}
    )
    
    find_package(Qt5 COMPONENTS Core Network REQUIRED)
    find_package(Cutelyst3Qt5 REQUIRED)
    
    # Create the application
     add_library(ServerREST2 SHARED ${ServerREST2_SRCS})
    
    # Link to Cutelyst
    target_link_libraries(ServerREST2
        Cutelyst::Core
        Qt5::Core
        Qt5::Network
    )
    

    CMakeLists.txt build file:

    project(ServerREST2)
    
    cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
    if (POLICY CMP0043)
      cmake_policy(SET CMP0043 NEW)
    endif()
    
    if(WIN32)
      if(MSVC)
        add_definitions(-D_SCL_SECURE_NO_WARNINGS)
        add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
      endif()
    endif()
    
    find_package(Qt5 COMPONENTS Core Network REQUIRED)
    find_package(Cutelyst2Qt5 REQUIRED)
    
    # Auto generate moc files
    set(CMAKE_AUTOMOC ON)
    
    # As moc files are generated in the binary dir, tell CMake
    # to always look for includes there:
    set(CMAKE_INCLUDE_CURRENT_DIR ON)
    
    file(GLOB_RECURSE TEMPLATES_SRC root/*)
    
    add_subdirectory(src)
    

    How to load the build file in Qt creator? The build file was generated along with the source files (apiv1.cpp apiv1.h root.cpp root.h serverrest2.cpp serverrest2.h) when creating the Cutelyst app. Do I need to include the executables like:

    add_executable(ServerREST2
        apiv1.cpp  
        root.cpp  
        serverrest2.cpp  
    )
    

    Thanks

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Are you able to build your project from the command line ?
      Which version of Qt Creator are you using ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved