Skip to content

Instantly share code, notes, and snippets.

@nnarain
Last active February 4, 2016 02:53
Show Gist options
  • Save nnarain/9083c9a0b2d3008c7699 to your computer and use it in GitHub Desktop.
Save nnarain/9083c9a0b2d3008c7699 to your computer and use it in GitHub Desktop.
Generic CMake file
#
# Generic CmakeList file
#
# @author Natesh Narain
cmake_minimum_required(VERSION 2.8)
project(MyProject)
# find packages
# includes
include_directories(
include
)
# find header & source
file(GLOB_RECURSE HEADER "include/*.h")
file(GLOB_RECURSE SOURCE "src/*.cpp")
add_executable(${PROJECT_NAME}
${SOURCE}
${HEADER}
)
source_group("Header include" FILES ${HEADER})
source_group("Source src" FILES ${SOURCE})
# link libraries
#target_link_libraries(${PROJECT_NAME} ${SOME_LIB})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment