File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 53
53
54
54
if [ " $LINK_STATIC " ]; then
55
55
STATIC_CONFIGURE_OPTION=" --enable-static"
56
+ STATIC_CMAKE_OPTION=" -DENABLE_STATIC=ON -DENABLE_TESTS=ON"
57
+ else
56
58
STATIC_CMAKE_OPTION=" -DENABLE_STATIC=OFF -DENABLE_TESTS=OFF"
57
59
fi
58
60
Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ set (PACKAGE_LIBRARIES mongoc-1.0)
4
4
5
5
include (CMakePackageConfigHelpers)
6
6
7
- foreach (prefix "1.0" "static-1.0" )
7
+ # These aren't pkg-config files, they're CMake package configuration files.
8
+ function (install_package_config_file prefix )
8
9
foreach (suffix "config.cmake" "config-version.cmake" )
9
10
configure_package_config_file (
10
11
build /cmake/libmongoc-${prefix} -${suffix} .in
@@ -15,9 +16,15 @@ foreach (prefix "1.0" "static-1.0")
15
16
16
17
install (
17
18
FILES
18
- ${CMAKE_CURRENT_BINARY_DIR} /libmongoc-${prefix} -${suffix}
19
+ ${CMAKE_CURRENT_BINARY_DIR} /libmongoc-${prefix} -${suffix}
19
20
DESTINATION
20
- lib/cmake/libmongoc-${prefix}
21
+ lib/cmake/libmongoc-${prefix}
21
22
)
22
23
endforeach ()
23
- endforeach ()
24
+ endfunction ()
25
+
26
+ install_package_config_file ("1.0" )
27
+
28
+ if (ENABLE_STATIC)
29
+ install_package_config_file ("static-1.0" )
30
+ endif ()
You can’t perform that action at this time.
0 commit comments