18 lines
457 B
CMake
18 lines
457 B
CMake
cmake_minimum_required(VERSION 3.22.1)
|
|
|
|
project(zzylib)
|
|
|
|
set(EXECUTABLE_OUTPUT_PATH ../)
|
|
set(C_STANDARD 99)
|
|
set(C_STANDARD_REQUIRED TRUE)
|
|
set(C_EXTENSIONS FALSE)
|
|
|
|
file(GLOB SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR}/src/*.c)
|
|
add_library(${PROJECT_NAME} STATIC ${SRC_FILE})
|
|
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
|
|
|
if(WIN32)
|
|
target_link_libraries(${PROJECT_NAME} wsock32 ws2_32)
|
|
endif()
|
|
# cmake ..
|
|
# cmake --build . |