Advertisement
RedWheelBarrow

cppstreams

Oct 16th, 2022
1,120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CMake 3.61 KB | Source Code | 0 0
  1. cmake_minimum_required(VERSION 3.8)
  2.  
  3. project(cppstreams)
  4.  
  5. set(CMAKE_CXX_STANDARD 20)
  6. set(CMAKE_CXX_STANDARD_REQUIRED ON)
  7.  
  8. set(SOURCES # Streams
  9.             src/cppstreams/streams.cpp
  10.              
  11.             # FileStreams
  12.             src/cppstreams/filestreams/filestream.cpp
  13.             src/cppstreams/filestreams/fileinputstream.cpp
  14.             src/cppstreams/filestreams/fileoutputstream.cpp
  15.                          
  16.             src/cppstreams/filestreams/abstracts/abstractfilestream.cpp
  17.             src/cppstreams/filestreams/abstracts/abstractfileinputstream.cpp
  18.             src/cppstreams/filestreams/abstracts/abstractfileoutputstream.cpp
  19.              
  20.             # SocketStreams
  21.             src/cppstreams/socketstreams/socketstream.cpp
  22.             src/cppstreams/socketstreams/socketinputstream.cpp
  23.             src/cppstreams/socketstreams/socketoutputstream.cpp
  24.            
  25.             src/cppstreams/socketstreams/abstracts/abstractsocketstream.cpp
  26.             src/cppstreams/socketstreams/abstracts/abstractsocketinputstream.cpp
  27.             src/cppstreams/socketstreams/abstracts/abstractsocketoutputstream.cpp
  28.              
  29.             # BufferedStreams
  30.             src/cppstreams/bufferedstreams/bufferedstream.cpp
  31.             src/cppstreams/bufferedstreams/bufferedinputstream.cpp
  32.             src/cppstreams/bufferedstreams/bufferedoutputstream.cpp
  33.            
  34.             src/cppstreams/bufferedstreams/abstracts/abstractbufferedinputstream.cpp
  35.             src/cppstreams/bufferedstreams/abstracts/abstractbufferedoutputstream.cpp
  36.              
  37.             # EncryptedStreams
  38.             src/cppstreams/encryptedstreams/encryptedstream.cpp
  39.             src/cppstreams/encryptedstreams/encryptedinputstream.cpp
  40.             src/cppstreams/encryptedstreams/encryptedoutputstream.cpp
  41.            
  42.             src/cppstreams/encryptedstreams/abstracts/abstractencryptedstream.cpp
  43. )
  44.  
  45. set(HEADERS # Interfaces
  46.             src/cppstreams/stream.h
  47.             src/cppstreams/inputstream.h
  48.             src/cppstreams/outputstream.h
  49.              
  50.             # Streams
  51.             src/cppstreams/streams.h
  52.              
  53.             # FileStreams
  54.             src/cppstreams/filestreams/filestream.h
  55.             src/cppstreams/filestreams/fileinputstream.h
  56.             src/cppstreams/filestreams/fileoutputstream.h
  57.          
  58.             src/cppstreams/filestreams/abstracts/abstractfilestream.h
  59.             src/cppstreams/filestreams/abstracts/abstractfileinputstream.h
  60.             src/cppstreams/filestreams/abstracts/abstractfileoutputstream.h
  61.              
  62.             # SocketStreams
  63.             src/cppstreams/socketstreams/socketstream.h
  64.             src/cppstreams/socketstreams/socketinputstream.h
  65.             src/cppstreams/socketstreams/socketoutputstream.h
  66.            
  67.             src/cppstreams/socketstreams/abstracts/abstractsocketstream.h
  68.             src/cppstreams/socketstreams/abstracts/abstractsocketinputstream.h
  69.             src/cppstreams/socketstreams/abstracts/abstractsocketoutputstream.h
  70.              
  71.             # BufferedStreams
  72.             src/cppstreams/bufferedstreams/bufferedstream.h
  73.             src/cppstreams/bufferedstreams/bufferedinputstream.h
  74.             src/cppstreams/bufferedstreams/bufferedoutputstream.h
  75.            
  76.             src/cppstreams/bufferedstreams/abstracts/abstractbufferedinputstream.h
  77.             src/cppstreams/bufferedstreams/abstracts/abstractbufferedoutputstream.h
  78.              
  79.             # EncryptedStreams
  80.             src/cppstreams/encryptedstreams/encryptedstream.h
  81.             src/cppstreams/encryptedstreams/encryptedinputstream.h
  82.             src/cppstreams/encryptedstreams/encryptedoutputstream.h
  83.            
  84.             src/cppstreams/encryptedstreams/abstracts/abstractencryptedstream.h
  85. )
  86.  
  87. set(BOOST_ROOT D:/Development/CXX/Libraries/Boost)
  88.  
  89. find_package(Boost REQUIRED)
  90.  
  91. set(Boost_USE_STATIC_LIBS ON)
  92. set(Boost_USE_MULTITHREADED ON)  
  93. set(Boost_USE_STATIC_RUNTIME ON)
  94.  
  95. add_library(${PROJECT_NAME} STATIC ${HEADERS} ${SOURCES})
  96.  
  97. add_subdirectory(libs/cpputils)
  98. target_link_libraries(${PROJECT_NAME} PUBLIC cpputils)
  99.  
  100. target_include_directories(${PROJECT_NAME} PUBLIC ${Boost_INCLUDE_DIR})
  101. target_include_directories(${PROJECT_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/src")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement