Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CMakeLists.txt that makes all the header and source files visible from Qt Creator
# CMakeLists.txt that makes all the header and source files visible from Qt Creator
cmake_minimum_required(VERSION 2.8)
execute_process(
COMMAND find . -name *.cpp -or -name *.hpp -or -name *.h -or -name *.cc -or -name *.hh
COMMAND tr "\n" ";"
OUTPUT_VARIABLE QTCREATOR_SRCS
OUTPUT_STRIP_TRAILING_WHITESPACE
)
add_custom_target(qtcreator SOURCES ${QTCREATOR_SRCS})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment