Last active
May 23, 2018 19:29
-
-
Save jameskbride/5736969 to your computer and use it in GitHub Desktop.
Basic CMakeLists.txt for a "Hello, World!" C++ project. It shows the use of a library which contains the class file for the application.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required (VERSION 2.8) | |
project (CMakeHelloWorld) | |
#version number | |
set (CMakeHelloWorld_VERSION_MAJOR 1) | |
set (CMakeHelloWorld_VERSION_MINOR 0) | |
#include the subdirectory containing our libs | |
add_subdirectory (Hello) | |
#indicate the entry point for the executable | |
add_executable (CMakeHelloWorld Hello HelloWorld.cpp) | |
# Indicate which libraries to include during the link process. | |
target_link_libraries (CMakeHelloWorld Hello) | |
install (TARGETS CMakeHelloWorld DESTINATION bin) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment