--- a/FORTRAN/CMakeLists.txt
+++ b/FORTRAN/CMakeLists.txt
@@ -15,8 +15,9 @@
   list(APPEND sources c2f_zcreate_matrix_x_b.c superlu_c2f_zwrap.c)
 endif()  
 
-add_library(superlu_dist_fortran ${sources})
-add_library(superlu_dist_fortran-static STATIC ${sources})
+add_library(superlu_dist_fortran_obj OBJECT ${sources})
+add_library(superlu_dist_fortran $<TARGET_OBJECTS:superlu_dist_fortran_obj>)
+add_library(superlu_dist_fortran-static STATIC $<TARGET_OBJECTS:superlu_dist_fortran_obj>)
 # set(targets superlu_dist_fortran)
 get_target_property(superlu_dist_version superlu_dist VERSION)
 get_target_property(superlu_dist_soversion superlu_dist SOVERSION)
