We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 280ae0e commit e42213cCopy full SHA for e42213c
CMakeLists.txt
@@ -170,6 +170,11 @@ set ( LIB_NAME ${PROJECT_NAME} )
170
add_library ( ${LIB_NAME} SHARED ${JF_LIB_SRCS} )
171
add_library ( ${LIB_NAME}-static STATIC ${JF_LIB_SRCS} )
172
173
+# add an alias so that including json-fortran is agnostic
174
+# of find_package or being directly compiled through add_subdirectory
175
+add_library ( ${PACKAGE_NAME}::${LIB_NAME} ALIAS ${LIB_NAME} )
176
+add_library ( ${PACKAGE_NAME}::${LIB_NAME}-static ALIAS ${LIB_NAME}-static )
177
+
178
if(JSON_FORTRAN_USE_OpenCoarrays)
179
target_link_libraries(${LIB_NAME}
180
PRIVATE OpenCoarrays::caf_mpi_static)
0 commit comments