From 60e523f3763d9d0e92e1b6edb019fbe2c75e82d6 Mon Sep 17 00:00:00 2001
From: Debolskiy Andrey <and.debol@gmail.com>
Date: Mon, 22 Jun 2020 21:28:25 +0300
Subject: [PATCH] removed target_sources in CMakeLists.txt to comply with older
 versions of cmake

---
 ParLib.src/CMakeLists.txt | 20 ++++----------------
 1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/ParLib.src/CMakeLists.txt b/ParLib.src/CMakeLists.txt
index f6f96ac..dba40a7 100644
--- a/ParLib.src/CMakeLists.txt
+++ b/ParLib.src/CMakeLists.txt
@@ -2,13 +2,10 @@
 add_library(plutils STATIC "")
 INCLUDE(plutils/CMakeLists.txt)
 if(BUILD_SHARED_LIBS)
-    add_library(parlibc-shared SHARED "")
-    target_sources(parlibc-shared
-            PRIVATE
+    add_library(parlibc-shared SHARED
             parlib.c
             bexchange.c
             transpose.c
-            PUBLIC
             parlib.h)
 
     target_include_directories(parlibc-shared
@@ -35,13 +32,10 @@ endif(BUILD_SHARED_LIBS)
 
 if(BUILD_STATIC_LIBS)
 
-add_library(parlibc-static STATIC "")
-target_sources(parlibc-static
-        PRIVATE
+add_library(parlibc-static STATIC
         parlib.c
         bexchange.c
         transpose.c
-        PUBLIC
         parlib.h)
 set_target_properties(parlibc-static
         PROPERTIES
@@ -76,14 +70,11 @@ if(BUILD_STATIC_LIBS)
     FortranCInterface_HEADER(${CMAKE_CURRENT_SOURCE_DIR}/FC.h MACRO_NAMESPACE "FC_")
     message(STATUS "FORTRAN_C_INTEFACE TEST:    ${FortranCInterface_VERIFIED_C}")
     add_definitions(-DFC_MANGLE=1)
-    add_library(parlibf-static STATIC "")
-    target_sources(parlibf-static
-            PRIVATE
+    add_library(parlibf-static STATIC
             parlibf.c
             bexchangef.c
             transposef.c
             FC.h
-            PUBLIC
             parlibf.h)
 
     target_link_libraries(parlibf-static
@@ -105,14 +96,11 @@ if(BUILD_STATIC_LIBS)
             )
 endif(BUILD_STATIC_LIBS)
     if(BUILD_SHARED_LIBS)
-    add_library(parlibf-shared SHARED "")
-    target_sources(parlibf-shared
-            PRIVATE
+    add_library(parlibf-shared SHARED
             parlibf.c
             bexchangef.c
             transposef.c
             FC.h
-            PUBLIC
             parlibf.h)
 
     target_link_libraries(parlibf-shared
-- 
GitLab