blob: e4f2729483638d2a1929cd905338dc51493282f2 (
plain) (
blame)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ca945dd..aff8b5f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,7 +23,7 @@ else()
set(ParMETIS_LIBRARY_TYPE STATIC)
endif()
-include(${GKLIB_PATH}/GKlibSystem.cmake)
+include_directories(${GKLIB_PATH})
# List of paths that the compiler will search for header files.
# i.e., the -I equivalent
@@ -33,7 +33,7 @@ include_directories(${GKLIB_PATH})
include_directories(${METIS_PATH}/include)
# List of directories that cmake will look for CMakeLists.txt
-add_subdirectory(${METIS_PATH}/libmetis ${CMAKE_BINARY_DIR}/libmetis)
+find_library(METIS_LIBRARY metis PATHS ${METIS_PATH}/lib)
add_subdirectory(include)
add_subdirectory(libparmetis)
add_subdirectory(programs)
diff --git a/libparmetis/CMakeLists.txt b/libparmetis/CMakeLists.txt
index 9cfc8a7..e0c4de7 100644
--- a/libparmetis/CMakeLists.txt
+++ b/libparmetis/CMakeLists.txt
@@ -5,7 +5,10 @@ file(GLOB parmetis_sources *.c)
# Create libparmetis
add_library(parmetis ${ParMETIS_LIBRARY_TYPE} ${parmetis_sources})
# Link with metis and MPI libraries.
-target_link_libraries(parmetis metis ${MPI_LIBRARIES})
+target_link_libraries(parmetis ${METIS_LIBRARY} ${MPI_LIBRARIES})
+if(UNIX)
+ target_link_libraries(parmetis m)
+endif()
set_target_properties(parmetis PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
install(TARGETS parmetis
diff --git a/libparmetis/parmetislib.h b/libparmetis/parmetislib.h
index c1daeeb..07511f6 100644
--- a/libparmetis/parmetislib.h
+++ b/libparmetis/parmetislib.h
@@ -20,13 +20,12 @@
#include <parmetis.h>
-#include "../metis/libmetis/gklib_defs.h"
+#include <gklib_defs.h>
-#include <mpi.h>
+#include <mpi.h>
#include <rename.h>
#include <defs.h>
#include <struct.h>
#include <macros.h>
#include <proto.h>
-
diff --git a/programs/parmetisbin.h b/programs/parmetisbin.h
index e26cd2d..d156480 100644
--- a/programs/parmetisbin.h
+++ b/programs/parmetisbin.h
@@ -19,7 +19,7 @@
#include <GKlib.h>
#include <parmetis.h>
-#include "../metis/libmetis/gklib_defs.h"
+#include <gklib_defs.h>
#include "../libparmetis/rename.h"
#include "../libparmetis/defs.h"
#include "../libparmetis/struct.h"
|