mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-24 02:50:03 +08:00
21 lines
544 B
CMake
21 lines
544 B
CMake
|
cmake_minimum_required(VERSION 3.2)
|
||
|
project(fzf C)
|
||
|
|
||
|
add_library(${PROJECT_NAME} SHARED "src/fzf.c")
|
||
|
|
||
|
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||
|
PREFIX "lib"
|
||
|
C_STANDARD 99
|
||
|
WINDOWS_EXPORT_ALL_SYMBOLS ON
|
||
|
)
|
||
|
|
||
|
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||
|
|
||
|
if (CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
||
|
target_compile_options(${PROJECT_NAME} PRIVATE /W4)
|
||
|
else ()
|
||
|
target_compile_options(${PROJECT_NAME} PRIVATE -Wall)
|
||
|
endif ()
|
||
|
|
||
|
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_BINARY_DIR})
|