This repository has been archived on 2021-04-17. You can view files and clone it, but cannot push or open issues or pull requests.
2020-07-04 15:43:30 +00:00
|
|
|
cmake_minimum_required(VERSION 3.16)
|
|
|
|
project(microirc LANGUAGES C)
|
|
|
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic")
|
2020-07-06 14:29:38 +00:00
|
|
|
if (NOT CMAKE_BUILD_TYPE)
|
|
|
|
set(CMAKE_BUILD_TYPE Debug)
|
|
|
|
endif()
|
2020-07-04 15:43:30 +00:00
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build/bin)
|
|
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build/lib)
|
|
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build/archive)
|
|
|
|
|
2020-07-11 21:52:50 +00:00
|
|
|
if ( UIRC_IRCV3 )
|
|
|
|
add_definitions(-DUIRC_IRCV3)
|
|
|
|
endif()
|
2020-07-09 20:54:11 +00:00
|
|
|
if ( BUILD_TESTS )
|
|
|
|
enable_testing()
|
|
|
|
add_subdirectory(tests)
|
|
|
|
endif()
|
2020-07-04 15:43:30 +00:00
|
|
|
set(build_FILES src/uirc.c)
|
|
|
|
if ( USE_HELPERS )
|
|
|
|
message("Helper functions are going to be built.")
|
|
|
|
set(build_FILES src/uirc.c src/helpers.c)
|
|
|
|
endif()
|
|
|
|
add_library(uirc SHARED ${build_FILES})
|
2020-07-05 11:14:41 +00:00
|
|
|
set_property(TARGET uirc PROPERTY C_STANDARD 99)
|
2020-07-04 15:43:30 +00:00
|
|
|
|
|
|
|
install(TARGETS uirc DESTINATION ${CMAKE_INSTALL_BINDIR})
|