Skip to content

Instantly share code, notes, and snippets.

@iabaldwin
Created March 31, 2017 18:03
Show Gist options
  • Save iabaldwin/807ab13747651909b275529399787aa1 to your computer and use it in GitHub Desktop.
Save iabaldwin/807ab13747651909b275529399787aa1 to your computer and use it in GitHub Desktop.
diff -Naur MIToolbox.orig/CMakeLists.txt MIToolbox/CMakeLists.txt
--- MIToolbox.orig/CMakeLists.txt 1969-12-31 16:00:00.000000000 -0800
+++ MIToolbox/CMakeLists.txt 2017-03-31 10:59:40.000000000 -0700
@@ -0,0 +1,23 @@
+project(MIToolbox)
+
+cmake_minimum_required(VERSION 2.8.0)
+
+if(NOT EXISTS MIToolbox)
+ exec_program(unzip ARGS "MIToolbox.zip")
+endif()
+
+add_definitions(-DCOMPILE_C)
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+
+file(GLOB libmi_srcs "*.c")
+file(GLOB libmi_headers "*.h")
+
+list(REMOVE_ITEM libmi_srcs ${CMAKE_CURRENT_SOURCE_DIR}/MIToolboxMex.c)
+list(REMOVE_ITEM libmi_srcs ${CMAKE_CURRENT_SOURCE_DIR}/RenyiMIToolboxMex.c)
+list(REMOVE_ITEM libmi_srcs ${CMAKE_CURRENT_SOURCE_DIR}/WeightedMIToolboxMex.c)
+
+add_library(MIToolbox ${libmi_srcs})
+
+install(TARGETS MIToolbox DESTINATION lib)
+install(FILES ${libmi_headers} DESTINATION include/MIToolbox)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment