-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Rebuilt cmake * Added swapfiles for vim * Changed optimization * Bump version number to match git * Rebuilt cmake to make config file * Added pipeline file * Update README.md
- Loading branch information
1 parent
b261b7e
commit 6b85290
Showing
4 changed files
with
68 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
*.bak | ||
*.patch | ||
*.tmp | ||
*.swp | ||
|
||
*.o | ||
*.a | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,70 @@ | ||
set(lib lmfit) | ||
set(${lib}_LIBRARY ${lib} PARENT_SCOPE) | ||
include(GNUInstallDirs) | ||
set(lmfit_LIBRARY lmfit PARENT_SCOPE) | ||
|
||
set(src_files lmcurve.c lmmin.c lminvert.c) | ||
set(inc_files lmcurve.h lmmin.h lmstruct.h) | ||
set(HEADER_FILES lmcurve.h lmmin.h lmstruct.h) | ||
set(SOURCE_FILES lmcurve.c lmmin.c lminvert.c) | ||
|
||
add_library(${lib} ${src_files}) | ||
add_library(lmfit ${SOURCE_FILES} ${HEADER_FILES}) | ||
|
||
set_target_properties( | ||
${lib} PROPERTIES | ||
OUTPUT_NAME ${lib} | ||
VERSION ${lmfit_VERSION_MAJOR} | ||
SOVERSION ${lmfit_VERSION_MINOR}) | ||
lmfit PROPERTIES | ||
OUTPUT_NAME lmfit | ||
VERSION ${lmfit_VERSION} | ||
SOVERSION ${lmfit_VERSION_MAJOR} | ||
PUBLIC_HEADER "${HEADER_FILES}" | ||
) | ||
|
||
target_include_directories(lmfit PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> | ||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> | ||
) | ||
|
||
include(LinkLibMath) | ||
link_libm(${lib}) | ||
link_libm(lmfit) | ||
|
||
if (LIB_INSTALL) | ||
include(CMakePackageConfigHelpers) | ||
|
||
install( | ||
TARGETS ${lib} LIBRARY | ||
DESTINATION ${destination}/lib | ||
TARGETS lmfit | ||
EXPORT lmfit-targets | ||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" | ||
PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" | ||
COMPONENT Libraries) | ||
|
||
install( | ||
EXPORT lmfit-targets | ||
FILE lmfit-targets.cmake | ||
NAMESPACE lmfit:: | ||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/lmfit" | ||
) | ||
|
||
configure_package_config_file( | ||
"${CMAKE_CURRENT_SOURCE_DIR}/lmfit-config.cmake.in" | ||
"${CMAKE_CURRENT_BINARY_DIR}/lmfit-config.cmake" | ||
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/lmfit" | ||
) | ||
|
||
write_basic_package_version_file( | ||
"${CMAKE_CURRENT_BINARY_DIR}/lmfit-config-version.cmake" | ||
VERSION ${lmfit_VERSION} | ||
COMPATIBILITY AnyNewerVersion | ||
) | ||
|
||
install( | ||
FILES "${CMAKE_CURRENT_BINARY_DIR}/lmfit-config.cmake" | ||
"${CMAKE_CURRENT_BINARY_DIR}/lmfit-config-version.cmake" | ||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/lmfit" | ||
) | ||
|
||
configure_file( | ||
"${CMAKE_SOURCE_DIR}/lmfit.pc.in" | ||
"${CMAKE_CURRENT_BINARY_DIR}/lmfit.pc" @ONLY | ||
) | ||
|
||
install( | ||
FILES ${inc_files} | ||
DESTINATION ${destination}/include | ||
COMPONENT Headers) | ||
FILES "${CMAKE_CURRENT_BINARY_DIR}/lmfit.pc" | ||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig/" | ||
) | ||
|
||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@PACKAGE_INIT@ | ||
|
||
if(NOT TARGET lmfit::lmfit) | ||
include(${CMAKE_CURRENT_LIST_DIR}/lmfit-targets.cmake) | ||
endif() |