cmake_minimum_required(VERSION 3.12) project(cryptutils LANGUAGES C) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin) set(CMAKE_STATIC_LIBRARY_PREFIX "") find_package(OpenSSL REQUIRED) file(GLOB SRC_UTIL ${PROJECT_SOURCE_DIR}/src/util/*) add_library(libutil STATIC ${SRC_UTIL}) link_libraries(libutil) add_executable(alder32 ${PROJECT_SOURCE_DIR}/src/alder32.c) add_executable(crc32 ${PROJECT_SOURCE_DIR}/src/crc32.c) add_executable(fnv1a64 ${PROJECT_SOURCE_DIR}/src/fnv1a64.c) add_executable(otp ${PROJECT_SOURCE_DIR}/src/otp.c) add_executable(rc2 ${PROJECT_SOURCE_DIR}/src/rc2.c) target_link_libraries(otp OpenSSL::Crypto)