-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
35 lines (30 loc) · 1.39 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
cmake_minimum_required(VERSION 3.4.0)
project(NumbaMinpack LANGUAGES Fortran)
option(SKBUILD "Should be ON of being build by skbuild,
and OFF of being build by regular cmake" OFF)
if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "")
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
endif()
add_library(minpack SHARED
${CMAKE_CURRENT_SOURCE_DIR}/src/minpack.f90
${CMAKE_CURRENT_SOURCE_DIR}/src/dogleg.f
${CMAKE_CURRENT_SOURCE_DIR}/src/dpmpar.f
${CMAKE_CURRENT_SOURCE_DIR}/src/enorm.f
${CMAKE_CURRENT_SOURCE_DIR}/src/fdjac1.f
${CMAKE_CURRENT_SOURCE_DIR}/src/fdjac2.f
${CMAKE_CURRENT_SOURCE_DIR}/src/hybrd.f
${CMAKE_CURRENT_SOURCE_DIR}/src/hybrd1.f
${CMAKE_CURRENT_SOURCE_DIR}/src/lmdif.f
${CMAKE_CURRENT_SOURCE_DIR}/src/lmdif1.f
${CMAKE_CURRENT_SOURCE_DIR}/src/lmpar.f
${CMAKE_CURRENT_SOURCE_DIR}/src/qform.f
${CMAKE_CURRENT_SOURCE_DIR}/src/qrfac.f
${CMAKE_CURRENT_SOURCE_DIR}/src/qrsolv.f
${CMAKE_CURRENT_SOURCE_DIR}/src/r1mpyq.f
${CMAKE_CURRENT_SOURCE_DIR}/src/r1updt.f)
set_target_properties(minpack PROPERTIES PREFIX "lib")
if (SKBUILD)
install(TARGETS minpack DESTINATION NumbaMinpack)
else()
install(TARGETS minpack DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/NumbaMinpack/)
endif()