Advertisement
totalboy

Example 1

Feb 13th, 2021
437
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. cmake_minimum_required(VERSION 3.1)
  2. set(PROJECT_NAME Example1)
  3. project(${PROJECT_NAME} LANGUAGES CXX)
  4.  
  5. set(VKAPI_CONFIG_CMAKE "../../lib/cmake/")
  6. set(VKAPI_INCLUDE_DIRS "../../bin/")
  7.  
  8. add_executable(${PROJECT_NAME} main.cpp)
  9.  
  10. find_package(VKAPI CONFIG REQUIRED HINTS ${VKAPI_CONFIG_CMAKE})
  11. if (VKAPI_FOUND)
  12.     message("-- VKAPI was found!")
  13.     target_link_libraries(${PROJECT_NAME} PRIVATE VKAPI::VKAPI)
  14.     target_include_directories(${PROJECT_NAME} PRIVATE ${VKAPI_INCLUDE_DIRS})
  15. endif()
  16.  
  17. # Include curl
  18. find_package(CURL REQUIRED)
  19. if (CURL_FOUND)
  20.     target_link_directories(${PROJECT_NAME} PUBLIC ${CURL_INCLUDE_DIRS})
  21.     target_link_libraries(${PROJECT_NAME} PUBLIC CURL::libcurl)
  22. endif()
  23.  
  24. set_target_properties(
  25.     ${PROJECT_NAME} PROPERTIES
  26.     CXX_STANDARD 14
  27.     CXX_STANDARD_REQUIRED on
  28. )
Advertisement
RAW Paste Data Copied
Advertisement