Skip to content

Commit 9471e33

Browse files
committed
Merge branch 'dev' of https://github.com/7bitcoder/7bitDI into dev
2 parents a29f30f + c9ea43e commit 9471e33

File tree

5 files changed

+26
-34
lines changed

5 files changed

+26
-34
lines changed

CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ if(_7BIT_DI_BUILD_DOCS)
2525
endif()
2626

2727
if(_7BIT_DI_BUILD_TESTS)
28+
include(GoogleTest)
29+
enable_testing()
30+
2831
add_subdirectory(Tests)
2932
endif()
3033

@@ -58,9 +61,11 @@ if(_7BIT_DI_INSTALL)
5861
FILE ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_TARGETS_FILE})
5962

6063
install(
64+
EXPORT 7bitDI
6165
EXPORT 7bitDI
6266
DESTINATION ${EXPORT_DEST_DIR}
6367
NAMESPACE 7bitDI::
68+
NAMESPACE 7bitDI::
6469
FILE ${CONFIG_TARGETS_FILE})
6570

6671
include(CMakePackageConfigHelpers)
@@ -69,9 +74,8 @@ if(_7BIT_DI_INSTALL)
6974
INSTALL_DESTINATION ${EXPORT_DEST_DIR})
7075

7176
write_basic_package_version_file(${VERSIONS_CONFIG_FILE} COMPATIBILITY SameMajorVersion)
72-
install(FILES ${PROJECT_CONFIG_OUT} ${VERSIONS_CONFIG_FILE} DESTINATION ${EXPORT_DEST_DIR})
7377

74-
include(7bitDIGeneratePkgConfig)
78+
install(FILES ${PROJECT_CONFIG_OUT} ${VERSIONS_CONFIG_FILE} DESTINATION ${EXPORT_DEST_DIR})
7579

7680
export(PACKAGE 7bitDI)
7781

Cmake/7bitDI.pc.in

Lines changed: 0 additions & 12 deletions
This file was deleted.

Cmake/7bitDIGeneratePkgConfig.cmake

Lines changed: 0 additions & 3 deletions
This file was deleted.

Source/CMakeLists.txt

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,28 @@ include(GenerateExportHeader)
33

44
if(_7BIT_DI_BUILD_LIBRARY_TYPE STREQUAL "Shared")
55
add_library(7bitDI SHARED
6+
add_library(7bitDI SHARED
67
Source.cpp ${_7BIT_DI_ALL_HEADERS}
7-
)
8-
elseif(_7BIT_DI_BUILD_LIBRARY_TYPE STREQUAL "Static")
9-
add_library(7bitDI STATIC
8+
)
9+
elseif(_7BIT_DI_BUILD_LIBRARY_TYPE STREQUAL "Static")
10+
add_library(7bitDI STATIC
11+
add_library(7bitDI STATIC
1012
Source.cpp ${_7BIT_DI_ALL_HEADERS}
11-
)
12-
elseif(_7BIT_DI_BUILD_LIBRARY_TYPE STREQUAL "HeaderOnly")
13-
add_library(7bitDI INTERFACE)
14-
endif()
13+
)
14+
elseif(_7BIT_DI_BUILD_LIBRARY_TYPE STREQUAL "HeaderOnly")
15+
add_library(7bitDI INTERFACE)
16+
add_library(7bitDI INTERFACE)
17+
endif()
1518

16-
add_library(7bitDI::7bitDI ALIAS 7bitDI)
19+
add_library(7bitDI::7bitDI ALIAS 7bitDI)
20+
add_library(7bitDI::7bitDI ALIAS 7bitDI)
1721

18-
target_include_directories(
19-
7bitDI INTERFACE
20-
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/Include>
21-
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
22+
target_include_directories(
23+
7bitDI INTERFACE
24+
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/Include>
25+
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
2226

23-
set_target_properties(7bitDI PROPERTIES VERSION ${_7BIT_DI_VERSION})
24-
set_target_properties(7bitDI PROPERTIES DEBUG_POSTFIX d)
27+
set_target_properties(7bitDI PROPERTIES VERSION ${_7BIT_DI_VERSION})
28+
set_target_properties(7bitDI PROPERTIES DEBUG_POSTFIX d)
29+
set_target_properties(7bitDI PROPERTIES VERSION ${_7BIT_DI_VERSION})
30+
set_target_properties(7bitDI PROPERTIES DEBUG_POSTFIX d)

Tests/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
include(GoogleTest)
2-
enable_testing()
3-
41
find_package(GTest REQUIRED)
52

63
file(GLOB_RECURSE SOURCES CONFIGURE_DEPENDS *.cpp)

0 commit comments

Comments
 (0)