Skip to content

Instantly share code, notes, and snippets.

@madduci
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save madduci/6dc3cecddc15c9991f56 to your computer and use it in GitHub Desktop.
Save madduci/6dc3cecddc15c9991f56 to your computer and use it in GitHub Desktop.
Modern C++ - Applications/DemoApp1/CMakeLists.txt
cmake_minimum_required(VERSION 2.8.11)
set(APPLICATION_NAME "${PROJECT_PREFIX_NAME}_demoapp_one")
project(${APPLICATION_NAME} CXX)
#Suppressing CMAKE 3.0 warnings
if(POLICY CMP0043)
cmake_policy(SET CMP0043 OLD)
endif()
#-----------------------------
# Adding sources
#-----------------------------
include_directories(include)
include_directories(src)
file(GLOB_RECURSE ${APPLICATION_NAME}_HEADERS include/*.h)
file(GLOB_RECURSE ${APPLICATION_NAME}_SOURCES src/*.cpp)
#-----------------------------
# Generating Target
#-----------------------------
add_executable(${APPLICATION_NAME} main.cpp ${${APPLICATION_NAME}_SOURCES} ${${APPLICATION_NAME}_HEADERS})
#-----------------------------
# Linking libraries
#-----------------------------
target_link_libraries(${APPLICATION_NAME})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment