package An official xmake package repository https://xrepo.xmake.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

61 lines
1.7 KiB

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a15d19a..7fb5cd0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,11 +3,7 @@ project(METIS C)
set(SHARED FALSE CACHE BOOL "build a shared library")
-if(MSVC)
- set(METIS_INSTALL FALSE)
-else()
- set(METIS_INSTALL TRUE)
-endif()
+set(METIS_INSTALL TRUE)
# Configure libmetis library.
if(SHARED)
@@ -16,7 +12,7 @@ else()
set(METIS_LIBRARY_TYPE STATIC)
endif(SHARED)
-include(./conf/gkbuild.cmake)
+include(${GKLIB_PATH}/GKlibSystem.cmake)
# METIS' custom options
#option(IDX64 "enable 64 bit ints" OFF)
@@ -37,8 +33,8 @@ include(./conf/gkbuild.cmake)
# Add include directories.
# i.e., the -I equivalent
-include_directories(build/xinclude)
-include_directories(${GKLIB_PATH}/include)
+include_directories(include)
+include_directories(${GKLIB_PATH})
include_directories(${CMAKE_INSTALL_PREFIX}/include)
# List of paths that the compiler will search for library files.
@@ -47,6 +43,5 @@ link_directories(${GKLIB_PATH}/lib)
link_directories(${CMAKE_INSTALL_PREFIX}/lib)
# Recursively look for CMakeLists.txt in subdirs.
-add_subdirectory("build/xinclude")
+add_subdirectory("include")
add_subdirectory("libmetis")
-add_subdirectory("programs")
diff --git a/libmetis/CMakeLists.txt b/libmetis/CMakeLists.txt
index fc6cec6..e713c2c 100644
--- a/libmetis/CMakeLists.txt
+++ b/libmetis/CMakeLists.txt
@@ -5,7 +5,10 @@ include_directories(.)
file(GLOB metis_sources *.c)
# Build libmetis.
-add_library(metis ${METIS_LIBRARY_TYPE} ${metis_sources})
+if (MSVC)
+ set(GKlib_sources ${GKlib_sources} ${GKLIB_PATH}/win32/adapt.c)
+endif (MSVC)
+add_library(metis ${METIS_LIBRARY_TYPE} ${metis_sources} ${GKlib_sources})
if(METIS_INSTALL)
install(TARGETS metis