Skip to content

Commit 5a7a226

Browse files
committed
Removed unknown include, remove setting cmake_cxx_flags, renamed DBC_FETCH_CONTENT_INCLUSION -> DBC_GENERATE_PKGCONFIG
1 parent 35a9502 commit 5a7a226

1 file changed

Lines changed: 7 additions & 22 deletions

File tree

‎CMakeLists.txt‎

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
cmake_minimum_required(VERSION 3.16)
22

3-
project(dbc VERSION 0.2.0 DESCRIPTION "C++ DBC Parser")
3+
project(dbc
4+
VERSION 0.2.0
5+
DESCRIPTION "C++ DBC Parser"
6+
)
47

58
# -- PROJECT OPTIONS -- #
69
option(DBC_ENABLE_TESTS "Enable Unittests" ON)
710
option(DBC_TEST_LOCALE_INDEPENDENCE "Used to deterime if the libary is locale agnostic when it comes to converting floats. You need `de_DE.UTF-8` locale installed for this testing." OFF)
811
# Turn OFF, if you are using FetchContent to include it to your project
9-
option(DBC_FETCH_CONTENT_INCLUSION "Include project with FetchContent_Declare in another project. In this case the headers and the cmake files are not needed, only the library" OFF)
12+
option(DBC_GENERATE_PKGCONFIG "Include project with FetchContent_Declare in another project. In this case the headers and the cmake files are not needed, only the library" OFF)
1013
option(DBC_GENERATE_DOCS "Use doxygen if installed to generated documentation files" OFF)
1114
# ---------------------- #
1215

@@ -20,9 +23,6 @@ set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE)
2023
set(CPACK_RESOURCE_FILE_README ${CMAKE_CURRENT_SOURCE_DIR}/README.md)
2124
include(CPack)
2225

23-
# defines variables used in the dbc.pc.in
24-
include(GNUInstallDirs)
25-
2626
# specify the C++ standard
2727
set(CMAKE_CXX_STANDARD 11)
2828
set(CMAKE_CXX_STANDARD_REQUIRED True)
@@ -40,13 +40,6 @@ if (NOT ${FastFloat_FOUND})
4040
add_subdirectory(${fastfloat_SOURCE_DIR} ${fastfloat_BINARY_DIR} EXCLUDE_FROM_ALL)
4141
endif()
4242

43-
set(GCC_COMPILE_FLAGS "-Wextra -Wall -Wfloat-equal -Wundef -Wshadow \
44-
-Wpointer-arith -Wcast-align -Wstrict-prototypes -Wwrite-strings \
45-
-Waggregate-return -Wcast-qual -Wswitch-default -Wswitch-enum -Wconversion \
46-
-Wunreachable-code -Wformat=2 -Werror -Wuninitialized -Winit-self")
47-
48-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
49-
5043
# add where to find the source files
5144
list(APPEND SOURCE_FILES
5245
${PROJECT_SOURCE_DIR}/src/utils.cpp
@@ -95,18 +88,10 @@ install(TARGETS ${PROJECT_NAME}
9588
DESTINATION ${CMAKE_INSTALL_LIBDIR})
9689

9790
# install headers
98-
if (${CMAKE_MINOR_VERSION} GREATER_EQUAL 23 AND NOT FETCH_CONTENT_INCLUSION)
99-
install(TARGETS ${PROJECT_NAME}
100-
FILE_SET HEADERS
101-
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lib${PROJECT_NAME}
102-
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
103-
)
104-
elseif(NOT DBC_FETCH_CONTENT_INCLUSION)
105-
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/libdbc DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
106-
endif()
91+
nstall(DIRECTORY ${PROJECT_SOURCE_DIR}/include/libdbc DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
10792

10893

109-
if (NOT DBC_FETCH_CONTENT_INCLUSION)
94+
if (NOT DBC_GENERATE_PKGCONFIG)
11095
# Generate pkg-config file
11196
configure_file(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY)
11297
install(

0 commit comments

Comments
 (0)