ynspkg/CMakeLists.txt

32 lines
708 B
Text
Raw Normal View History

2025-01-05 14:22:47 +01:00
cmake_minimum_required(VERSION 3.10)
2025-01-05 15:29:19 +01:00
project(yns)
2025-01-05 14:22:47 +01:00
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
2025-01-05 15:29:19 +01:00
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
set(BUILD_SHARED_LIBS OFF)
set(CMAKE_EXE_LINKER_FLAGS "-static")
2025-01-05 14:22:47 +01:00
2025-01-05 15:29:19 +01:00
set(CURL_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/deps/install/include")
set(CURL_LIBRARY "${CMAKE_SOURCE_DIR}/deps/install/lib/libcurl.a")
2025-01-05 14:22:47 +01:00
2025-01-05 15:29:19 +01:00
find_package(OpenSSL REQUIRED)
find_package(ZLIB REQUIRED)
2025-01-05 14:22:47 +01:00
2025-01-05 15:29:19 +01:00
add_executable(yns
src/main.cpp
src/package_manager.cpp)
2025-01-05 14:22:47 +01:00
2025-01-05 15:29:19 +01:00
target_include_directories(yns PRIVATE
${CMAKE_SOURCE_DIR}/include
${CURL_INCLUDE_DIR})
2025-01-05 14:22:47 +01:00
2025-01-05 15:29:19 +01:00
target_link_libraries(yns PRIVATE
${CURL_LIBRARY}
OpenSSL::SSL
OpenSSL::Crypto
ZLIB::ZLIB
-static
-pthread)