How to deploy headers and then make them readonly from qmake and qtcreator?



  • I deploy my libraries to a specific set of 'lib' and 'include' directory. I would like to ensure that if I use these header files from a different project I do not accidentally modify the deployed header files, because they will be overwritten the next time I deploy, plus this creates discrepancy with the library.

    How can I make deployed header files readonly using qmake?

    As I share this environment with the other members of my team, I would prefer to solve this from qtmake, in stead of doing something on my machine only. I distribute using git.

    Anyone ideas?

    An example of a .pro file is:

    @QT -= qt
    QT -= core gui

    TARGET = bitpowder
    TEMPLATE = lib

    CONFIG += C++11
    CONFIG += create_prl
    CONFIG += link_prt
    CONFIG += static dll

    DEFINES += BITPOWDER_LIBRARY

    # just a few example source files
    

    SOURCES +=
    dispatch.cpp
    stringparse.cpp
    thread.cpp
    type_hash.cpp \

    # just a few example source files
    

    HEADERS +=
    bitpowder_global.h
    dispatch.h
    stringparse.h
    thread.h
    type_hash.h
    zip.h
    ################################################

    INSTALL instructions

    ################################################

    unix|win32 {
    target.path = $$PWD/../../lib/bitpowder
    INSTALLS += target

    headerfiles.path=$$PWD/../../include/bitpowder
    headerfiles.files = $$PWD/*.h
    INSTALLS += headerfiles
    

    }

    @


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.