Skip to content
Snippets Groups Projects
Commit 4c2a5cd9 authored by Oliver Heidmann's avatar Oliver Heidmann
Browse files

CMake: fixed typo, moved library declaration to main CMake file, added compile commands

parent 72c71a78
No related branches found
No related tags found
1 merge request!145M300433/cmake improvements and cleanup 2
cmake_minimum_required( VERSION 3.27 FATAL_ERROR )
message(VERBOSE "Entering libcdi")
message(VERBOSE "Entering cdilib")
project(cdilib VERSION 2.5.1 LANGUAGES C )
set(CMAKE_C_STANDARD 11)
set(CMAKE_EXPORT_COMPILE_COMMANDS YES)
add_library(cdilib)
add_library(cdilib::cdilib ALIAS cdilib)
include(CTest)
include(CheckIncludeFile)
......
......@@ -199,16 +199,12 @@ endif ()
# Support exporting all symbolds on Windows
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
add_library(cdilib
${cdi_src_files}
# INSTALL_HEADERS_LIST cdi.h
)
target_include_directories(cdilib PRIVATE "${PROJECT_BINARY_DIR}/src/config.h")
target_link_libraries(cdilib ${cdi_linked_libs})
target_compile_definitions(cdilib PRIVATE PACKAGE_NAME="${PROJECT_NAME}" VERSION="${CMAKE_PROJECT_VERSION}" ${cdi_compile_defs})
add_library(cdilib::cdilib ALIAS cdilib)
include(GNUInstallDirs)
install(FILES cdi.h calendar.h cdi_datetime.h julian_date.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment