CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(maxsimplex)

INCLUDE_DIRECTORIES(../libnormaliz)
INCLUDE_DIRECTORIES(..)

INCLUDE_DIRECTORIES(${GMP_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${GMPXX_INCLUDE_DIR})

ADD_EXECUTABLE (maxsimplex maxsimplex.cpp)

IF (NMZ_BUILD_STATIC)
  TARGET_LINK_LIBRARIES (maxsimplex normaliz-static)
  #Static start and end
  SET_TARGET_PROPERTIES(maxsimplex PROPERTIES LINK_SEARCH_START_STATIC 1)
  SET_TARGET_PROPERTIES(maxsimplex PROPERTIES LINK_SEARCH_END_STATIC 1)
  # Don't try to modify the RPATH
  SET_TARGET_PROPERTIES(maxsimplex PROPERTIES INSTALL_RPATH "")
ELSE (NMZ_BUILD_STATIC)
    TARGET_LINK_LIBRARIES (maxsimplex normaliz-shared)
ENDIF (NMZ_BUILD_STATIC)
