[cmake-example] Update cmake project example
+ Rename `cmake` -> `cmake-example`
This commit is contained in:
14
cpp/cmake-example/src/CMakeLists.txt
Normal file
14
cpp/cmake-example/src/CMakeLists.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
###############################################################################
|
||||
## Author: Shaun Reed ##
|
||||
## Legal: All Content (c) 2022 Shaun Reed, all rights reserved ##
|
||||
## ##
|
||||
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
|
||||
##############################################################################
|
||||
## This directory is for storing source code
|
||||
|
||||
# Create any links we might need
|
||||
set(LIB_SRC lib-klips.cpp)
|
||||
|
||||
# Define our library within CMake and link to the source code
|
||||
add_library(lib-klips ${LIB_SRC})
|
||||
|
||||
18
cpp/cmake-example/src/lib-klips.cpp
Normal file
18
cpp/cmake-example/src/lib-klips.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
/*##############################################################################
|
||||
## Author: Shaun Reed ##
|
||||
## Legal: All Content (c) 2022 Shaun Reed, all rights reserved ##
|
||||
## ##
|
||||
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
|
||||
################################################################################
|
||||
*/
|
||||
|
||||
#include <lib-klips.hpp>
|
||||
#include <iostream>
|
||||
|
||||
void PrintHello(int n) {
|
||||
while (n) {
|
||||
std::cout << n << ". " << "Hello World!" << std::endl;
|
||||
--n;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user