[cmake-example] Update cmake project example
+ Rename `cmake` -> `cmake-example`
This commit is contained in:
17
cpp/cmake-example/apps/CMakeLists.txt
Normal file
17
cpp/cmake-example/apps/CMakeLists.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
###############################################################################
|
||||
## 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 / compiling our executable code
|
||||
|
||||
# Create a reference / variable to refer to our source code
|
||||
set(APP_SRC say-hello.cpp)
|
||||
|
||||
# Add our executable, naming it and linking it to our source code
|
||||
add_executable(say-hello ${APP_SRC})
|
||||
|
||||
# Link to our custom library, defined in c-cmake/src/
|
||||
target_link_libraries(say-hello lib-klips)
|
||||
|
||||
19
cpp/cmake-example/apps/say-hello.cpp
Normal file
19
cpp/cmake-example/apps/say-hello.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
/*##############################################################################
|
||||
## 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>
|
||||
|
||||
int main () {
|
||||
PrintHello(5);
|
||||
std::cout << "Press enter to exit the application. \n";
|
||||
std::cin.ignore();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user