Skip to content

Commit f9b22bb

Browse files
committed
Account for prerelease version and different API compatibility
1 parent 43382dd commit f9b22bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

config/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ configure_package_config_file(
1919
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake"
2020
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
2121
)
22-
if(BUILD_SHARED_LIBS)
22+
if(BUILD_SHARED_LIBS OR PROJECT_VERSION_MAJOR EQUAL 0)
2323
# Due to the uncertain ABI compatibility of Fortran shared libraries
2424
# limit compatibility for dynamic linking to same minor version.
2525
set(COMPATIBILITY SameMinorVersion)
2626
else()
27-
# Require API compatibility via semantic versioning for static linking,
27+
# Require API compatibility via semantic versioning for static linking.
2828
set(COMPATIBILITY SameMajorVersion)
2929
endif()
3030
write_basic_package_version_file(

0 commit comments

Comments
 (0)