2018-08-31 21:53:58 +08:00
|
|
|
cmake_minimum_required(VERSION 3.8)
|
|
|
|
project(libmodpbase64 C)
|
|
|
|
|
|
|
|
if(MSVC)
|
2023-01-21 14:13:43 +08:00
|
|
|
add_compile_options(/wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS)
|
2018-08-31 21:53:58 +08:00
|
|
|
endif()
|
|
|
|
|
2020-10-07 03:48:45 +08:00
|
|
|
configure_file(config.h.cmake config.h @ONLY)
|
2018-08-31 21:53:58 +08:00
|
|
|
|
2020-10-07 03:48:45 +08:00
|
|
|
include_directories(. ${SOURCE_PATH}/src ${CMAKE_CURRENT_BINARY_DIR})
|
2018-08-31 21:53:58 +08:00
|
|
|
|
2020-10-07 03:48:45 +08:00
|
|
|
add_library(libmodpbase64 ${SOURCE_PATH}/src/modp_b64.c libmodpbase64.def)
|
2018-08-31 21:53:58 +08:00
|
|
|
|
|
|
|
install(
|
|
|
|
TARGETS libmodpbase64
|
|
|
|
RUNTIME DESTINATION bin
|
|
|
|
LIBRARY DESTINATION lib
|
|
|
|
ARCHIVE DESTINATION lib
|
|
|
|
)
|
|
|
|
|
|
|
|
if(NOT DISABLE_INSTALL_HEADERS)
|
|
|
|
install(
|
2023-01-21 14:13:43 +08:00
|
|
|
FILES
|
|
|
|
"${SOURCE_PATH}/src/extern_c_begin.h"
|
|
|
|
"${SOURCE_PATH}/src/extern_c_end.h"
|
|
|
|
"${SOURCE_PATH}/src/modp_b64.h"
|
|
|
|
"${SOURCE_PATH}/src/modp_stdint.h"
|
2018-08-31 21:53:58 +08:00
|
|
|
DESTINATION include
|
|
|
|
)
|
|
|
|
endif()
|