From 4dbc29fcbb811a38b62efe35d75c00b73dee6ac4 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Thu, 2 Nov 2023 14:35:24 -0600 Subject: [PATCH 1/3] Remove unused Libs entry --- heat/heatcxx.pc.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/heat/heatcxx.pc.cmake b/heat/heatcxx.pc.cmake index 607c0b9..6317567 100644 --- a/heat/heatcxx.pc.cmake +++ b/heat/heatcxx.pc.cmake @@ -1,5 +1,4 @@ Name: HeatCXX Description: 2D Heat Equation Version: ${CMAKE_PROJECT_VERSION} -Libs: -L${CMAKE_INSTALL_FULL_LIBDIR} -l${bmi_name} Cflags: -I${CMAKE_INSTALL_FULL_INCLUDEDIR} From bd4e3ed37d8381e62197b9b9f1ba493bf2afdab0 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Thu, 2 Nov 2023 14:36:24 -0600 Subject: [PATCH 2/3] Add pkg-config file for model BMI --- heat/bmiheatcxx.pc.cmake | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 heat/bmiheatcxx.pc.cmake diff --git a/heat/bmiheatcxx.pc.cmake b/heat/bmiheatcxx.pc.cmake new file mode 100644 index 0000000..b66adb5 --- /dev/null +++ b/heat/bmiheatcxx.pc.cmake @@ -0,0 +1,5 @@ +Name: BmiHeatCXX +Description: BMI for HeatCXX model +Version: ${CMAKE_PROJECT_VERSION} +Cflags: -I${CMAKE_INSTALL_FULL_INCLUDEDIR} +Libs: -L${CMAKE_INSTALL_FULL_LIBDIR} -l${bmi_name} From 686e921e83acb0658d169eb5a7d7670fb60d0704 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Thu, 2 Nov 2023 14:37:34 -0600 Subject: [PATCH 3/3] Install bmiheatcxx pkg-config file and heatcxx library --- heat/CMakeLists.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/heat/CMakeLists.txt b/heat/CMakeLists.txt index e7754b6..9933954 100644 --- a/heat/CMakeLists.txt +++ b/heat/CMakeLists.txt @@ -4,10 +4,16 @@ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/${model_name}.pc.cmake ${CMAKE_BINARY_DIR}/heat/${model_name}.pc ) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/${bmi_name}.pc.cmake + ${CMAKE_BINARY_DIR}/heat/${bmi_name}.pc +) if(WIN32) + add_library(${model_name} heat.cxx) add_library(${bmi_name} bmi_heat.cxx heat.cxx) else() + add_library(${model_name} SHARED heat.cxx) add_library(${bmi_name} SHARED bmi_heat.cxx heat.cxx) endif() @@ -18,7 +24,7 @@ install( RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) install( - TARGETS ${bmi_name} + TARGETS ${model_name} ${bmi_name} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} @@ -28,6 +34,8 @@ install( DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ) install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/${model_name}.pc + FILES + ${CMAKE_CURRENT_BINARY_DIR}/${model_name}.pc + ${CMAKE_CURRENT_BINARY_DIR}/${bmi_name}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig )