Advertisement
Lumi_V

Extern CMake

Dec 15th, 2023
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CMake 0.87 KB | None | 0 0
  1. set(
  2.     LIBRARY_SOURCES
  3.     "glad/glad.c"
  4.     "imgui/imgui.cpp"
  5.     "imgui/imgui_tables.cpp"
  6.     "imgui/imgui_draw.cpp"
  7.     "imgui/imgui_widgets.cpp"
  8.     "imgui/backends/imgui_impl_opengl3.cpp"
  9.     "imgui/backends/imgui_impl_glfw.cpp"
  10. )
  11.  
  12. set(
  13.     LIBRARY_HEADERS
  14.     "glad/glad.h"
  15.     "stb/stb_image.h"
  16.     "stb/stb_image_write.h"
  17.     "stb/stb_image_resize.h"
  18.     "stb/stb_include.h"
  19.     "imgui/imgui.h"
  20.     "imgui/backends/imgui_impl_opengl3.h"
  21.     "imgui/backends/imgui_impl_glfw.h"
  22. )
  23.  
  24. set(
  25.     LIBRARY_INCLUDES
  26.     "./glad"
  27.     "./stb"
  28.     "./imgui"
  29.     "./imgui/backends"
  30. )
  31.  
  32. # STATIC/DYNAMIC LINKING OF LIBRARIES
  33. add_library(
  34.     ${EXTERN_LIBRARY_NAME} STATIC
  35.     ${LIBRARY_SOURCES}
  36.     ${LIBRARY_HEADERS}
  37. )
  38.  
  39. # Including the current directory for libraries
  40. target_include_directories(
  41.     ${EXTERN_LIBRARY_NAME} PUBLIC
  42.     ${LIBRARY_INCLUDES}
  43. )
  44.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement