Hi, I want to use QtSingleApplication in my application. I decided to use it as a thirdparty static library, apart from my own code. In the folder containing QtSingleApplication .h/.cpp files I created the following CMakeLists.txt:

Qt Code:
  1. PROJECT(qtsingleapplication)
  2. cmake_minimum_required(VERSION 2.8)
  3.  
  4. SET( qtsingleapplicationSources
  5. qtlocalpeer.cpp
  6. qtlockedfile.cpp
  7. qtlockedfile_unix.cpp
  8. qtlockedfile_win.cpp
  9. qtsingleapplication.cpp
  10. qtsinglecoreapplication.cpp
  11. )
  12.  
  13. INCLUDE_DIRECTORIES(${QT_INCLUDES}
  14. ${CMAKE_CURRENT_BINARY_DIR}
  15. ${CMAKE_CURRENT_SOURCE_DIR})
  16.  
  17. ADD_LIBRARY( myapp_qtsingleapplication STATIC ${qtsingleapplicationSources} )
  18. TARGET_LINK_LIBRARIES( myapp_qtsingleapplication ${QT_QTNETWORK_LIBRARY})
To copy to clipboard, switch view to plain text mode 

Unfortunately make fails with the following error:

myapp/thirdparty/QtSingleApplication/qtlockedfile.cpp:83:1: error: ‘QtLockedFile’ does not name a type
I can't understand the reason of the error; qtlockedfile.h is in place.

Can you help me?

Very thanks.