Advertisement
AlexNovoross87

Untitled

Nov 11th, 2024 (edited)
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CMake 1.37 KB | None | 0 0
  1. #1.РАЗАРХИВИРОВАТЬ БИБЛИОТЕКУ
  2. #2.ОТКРЫТЬ POWERSHELL ИЗ ПАПКИ И ВЫПОЛНИТЬ:
  3. #  b2 link=static runtime-link=static --prefix=F:\boost install
  4.  
  5. #№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№
  6. cmake_minimum_required(VERSION 3.11 FATAL_ERROR)
  7. project(sorts CXX)
  8. set(CMAKE_CXX_STANDARD 20)
  9.  
  10.  
  11. # Set Boost options
  12. set(Boost_USE_STATIC_LIBS ON)
  13. set(Boost_USE_MULTITHREADED ON)
  14. set(Boost_USE_STATIC_RUNTIME ON)
  15.  
  16. set(BOOST_ROOT "F:/boost") #где дирректория буста
  17. set(BOOST_INCLUDEDIR "F:/boost/include/boost-1_86") #где дирректория буста инклюдов
  18.  
  19. ##ВАЖНО!!!! ЕСЛИ КОМПИЛЯТОР MINGW
  20. if(MINGW)
  21.   link_libraries(ws2_32 wsock32)
  22. endif()
  23.  
  24. # Find Boost ИСКАТЬ БУСТ
  25. find_package(Boost 1.86.0 REQUIRED)
  26.  
  27.  
  28. if(Boost_FOUND)
  29.      add_executable(exerce main.cpp)    
  30. # Include Boost headers
  31.     include_directories(${BOOST_INCLUDEDIR}) #ДЛЯ ПОИСКА КОМПИЛЯЦИИ
  32.     include_directories(${BOOST_ROOT})#ДЛЯ ПОИСКА КОМПИЛЯЦИИ
  33.  
  34.     # Link against Boost libraries
  35.     target_link_libraries(exerce ${Boost_LIBRARIES})
  36. endif()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement