WebDisk_C/CMakeLists.txt

15 lines
532 B
CMake
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

cmake_minimum_required(VERSION 3.0)
project(webdisk_c LANGUAGES C)
add_executable(webdisk_c main.c cJSON/cJSON.c)
set (CMAKE_C_FLAGS "-g -O3 -DUSE_JEMALLOC")# -DUSE_JEMALLOC
target_link_libraries(webdisk_c jemalloc)
target_include_directories(webdisk_c PRIVATE
"${CMAKE_SOURCE_DIR}/jemalloc/build/include"
)
# Правильно указываем папку с .so для линковки
target_link_directories(webdisk_c PRIVATE
"${CMAKE_SOURCE_DIR}/jemalloc/build/lib"
)
install(TARGETS webdisk_c RUNTIME DESTINATION bin)