Advertisement
ShalokShalom

cmake/ConfigurationData.cmake

Jul 5th, 2024
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CMake 0.57 KB | None | 0 0
  1. include(CheckFunctionExists)
  2. include(CheckIncludeFile)
  3.  
  4. # Generate config.h
  5. configure_file(
  6.     ${CMAKE_SOURCE_DIR}/config.h.in
  7.     ${CMAKE_BINARY_DIR}/config.h
  8. )
  9.  
  10. # Check for headers
  11. check_include_file(unistd.h HAVE_UNISTD_H)
  12. check_include_file(sys/time.h HAVE_SYS_TIME_H)
  13.  
  14. # Check for functions
  15. check_function_exists(mlock HAVE_MLOCK)
  16.  
  17. # Set configuration data
  18. set(PACKAGE_VERSION "${PROJECT_VERSION}")
  19. set(CONFIGURE_DATADIR "${CMAKE_INSTALL_FULL_DATADIR}")
  20. set(CONFIGURE_LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}")
  21.  
  22. # Add more configuration checks and data as needed
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement