Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # Project for secwipe command
- #
- cmake_minimum_required(VERSION 3.0)
- include(CheckCSourceCompiles)
- # We put this before the project() definition below so
- # we can change the CMAKE_C_COMPILER and CMAKE_CXX_COMPILER
- # beforehand. This allows us to default to clang over gcc.
- option(USE_CLANG "Build using clang (the default)" ON)
- if(USE_CLANG)
- message("-- Setting default compiler to clang.")
- set(CMAKE_C_COMPILER clang)
- set(CMAKE_CXX_COMPILER clang++)
- endif()
- project(Secwipe)
- CHECK_C_SOURCE_COMPILES([=[#include <gnu/libc-version.h>
- int main(void) { gnu_get_libc_version(); return 0; }]=]
- GLIBC_DETECTED)
- find_package(Curses REQUIRED)
- # Note: Including ${CMAKE_BINARY_DIR} so generated config.h will be found.
- include_directories(${CMAKE_BINARY_DIR} ${CURSES_INCLUDE_DIR})
- configure_file(config.h.in config.h)
- add_executable(secwipe secwipe.c)
- target_link_libraries(secwipe ${CURSES_LIBRARIES})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement