Skip to content

Commit 26a1311

Browse files
committed
Account for prerelease version and different API compatibility
1 parent c0b86d5 commit 26a1311

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

config/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
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)