Advertisement
Patrickquinn1212

FindMyLib.cmake

Aug 18th, 2022 (edited)
906
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.16 KB | None | 0 0
  1. # The places to look for the MyLib folders
  2. set(FIND_MyLib_PATHS   "/home/pat/Desktop/projects/Mylibraries")                              
  3.  
  4. # The location of the include folder (and thus the header files)
  5. # find_path uses the paths we defined above as places to look
  6. # Saves the location of the header files in a variable called MyLib_INCLUDE_DIR
  7. find_path(MyLib_INCLUDE_DIR list.h,list.c   # The variable to store the path in and the name of the header files
  8.         PATH_SUFFIXES include               # The folder name containing the header files
  9.         PATHS ${FIND_MyLib_PATHS})       # Where to look (defined above)
  10.  
  11. # The location of the lib folder (and thus the .a file)
  12. # find_library uses the paths we defined above as places to look
  13. # Saves the location of the .a file in a variable called MyLib_LIBRARY
  14. find_library(MyLib_LIBRARY               # The variable to store where it found the .a files
  15.         NAMES MyLib                      # The name of the .a file (without the extension and without the 'lib')
  16.         PATH_SUFFIXES lib                   # The folder the .a file is in
  17. PATHS ${FIND_MyLib_PATHS})               # Where to look (defined above)
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement