generated from glad3n/Command-line-text-processing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcmake.snippets
26 lines (19 loc) · 966 Bytes
/
cmake.snippets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
snippet cmake "this creates a simple cmake file" b
cmake_minimum_required(VERSION 3.4)
# set the project name properly for this
set(project_name " ") # (TODO: add project name)
# setting project name
project(${project_name})
# here add all the cpp files involved in the project
add_executable(${project_name} ) # (TODO: enter the cpp files after the project name one after the other with the path)
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_VERBOSE_MAKEFILE ON)
set(EXECUTABLE_OUTPUT_PATH ../bin)
# add all the include files
target_include_directories(${project_name} PUBLIC ./include
PUBLIC /usr/include
PUBLIC /usr/local/include) # you can keep adding more if you want
# here add all the libraries that you included
#target_link_libraries(${project_name} glfw3 GLEW GL GLU SOIL dl Xinerama Xrandr Xi Xcursor X11 Xxf86vm pthread) # this is and example
target_link_libraries(${project_name} ) # (TODO: add the required libraries here)
endsnippet