×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: CMake
Posted by: Rob Green
Added: Oct 13, 2022 6:44 PM
Views: 8
Tags: cmake
  1. set(FIND_MyLib_PATHS   "/home/pat/CLionProjects/Libraries")
  2.  
  3.  
  4.  
  5. # The location of the include folder (and thus the header files)
  6. # find_path uses the paths we defined above as places to look
  7. # Saves the location of the header files in a variable called MyLib_INCLUDE_DIR
  8. find_path(Logger_INCLUDE_DIR log.h timer.h   # The variable to store the path in and the name of the header files
  9.         PATH_SUFFIXES include               # The folder name containing the header files
  10.         PATHS ${FIND_MyLib_PATHS})       # Where to look (defined above)
  11.  
  12. # The location of the lib folder (and thus the .a file)
  13. # find_library uses the paths we defined above as places to look
  14. # Saves the location of the .a file in a variable called MyLib_LIBRARY
  15. find_library(Logger_LIBRARY            # The variable to store where it found the .a files
  16.         NAMES LoggerLibrary                 # The name of the .a file (without the extension and without the 'lib')
  17.         PATH_SUFFIXES lib                   # The folder the .a file is in
  18.         PATHS ${FIND_MyLib_PATHS})               # Where to look (defined above)