File: CMakeLists.txt

package info (click to toggle)
parmetis 4.0.3-5
  • links: PTS, VCS
  • area: non-free
  • in suites: bullseye, buster, sid
  • size: 25,384 kB
  • ctags: 3,256
  • sloc: ansic: 41,872; makefile: 298; sh: 190; perl: 25
file content (23 lines) | stat: -rw-r--r-- 942 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Include directories for library code.
include_directories(.)
# Find sources.
file(GLOB parmetis_sources *.c)
# Create libparmetis
add_library(parmetis SHARED ${parmetis_sources})
set_target_properties(parmetis PROPERTIES
  VERSION ${PARMETIS_MAJOR_VERSION}.${PARMETIS_MINOR_VERSION}.${PARMETIS_PATCH_VERSION}
  SOVERSION ${PARMETIS_MAJOR_VERSION}.${PARMETIS_MINOR_VERSION})

add_library(parmetis_static STATIC ${parmetis_sources})
set_target_properties(parmetis_static PROPERTIES OUTPUT_NAME parmetis)

# Link with metis and MPI libraries.
target_link_libraries(parmetis metis ${MPI_LIBRARIES})
set_target_properties(parmetis PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
target_link_libraries(parmetis_static metis_static ${MPI_LIBRARIES})
set_target_properties(parmetis_static PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")

install(TARGETS parmetis parmetis_static
  LIBRARY DESTINATION lib
  RUNTIME DESTINATION lib
  ARCHIVE DESTINATION lib)