cmake_minimum_required(VERSION 3.5)

project(launcher C)

set(
    LAUNCHER_NAME "launcher" CACHE STRING
    "The name of the launcher executable")

add_executable(launcher main.c)

set_target_properties(
    launcher PROPERTIES
    C_STANDARD 99
    C_STANDARD_REQUIRED YES
    C_EXTENSIONS NO
    OUTPUT_NAME "${LAUNCHER_NAME}")

target_compile_options(
    launcher PRIVATE -Wall -Wextra -pedantic -Wstrict-prototypes)

target_link_libraries(launcher dl)

# Install to the root of CMAKE_INSTALL_PREFIX, mainly to make the
# --strip option of "cmake --install" work.
install(TARGETS launcher DESTINATION .)
