cex/CMakeLists.txt
2024-04-15 18:53:44 +02:00

18 lines
596 B
CMake

cmake_minimum_required(VERSION 3.22)
project(cex)
include(CMakePrintHelpers)
set(CMAKE_C_COMPILER clang)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror")
set(CMAKE_EXPORT_COMPILE_COMMANDS true)
file(GLOB_RECURSE SOURCES "${CMAKE_SOURCE_DIR}/src/*.c")
add_library(cex ${SOURCES})
target_include_directories(cex PUBLIC "${CMAKE_SOURCE_DIR}/inc")
file(GLOB_RECURSE TEST_SOURCES "${CMAKE_SOURCE_DIR}/test/src/*.c")
add_executable(test ${TEST_SOURCES})
target_include_directories(test PUBLIC "${CMAKE_SOURCE_DIR}/inc" "${CMAKE_SOURCE_DIR}/test/inc")
target_link_libraries(test cex)