CMakeLists.txt 1.89 KB
#Specify the version being used aswell as the language
cmake_minimum_required(VERSION 2.8.11)

#Name your project here
project(netMets)

#set the module directory
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}")

#find the STIM library
find_package(STIM REQUIRED)

#find BOOST
find_package(Boost REQUIRED)

#find the pthreads package
find_package(Threads)

#find the X11 package
find_package(X11)

#find the Approximate Nearest Neighbor Library
find_package(ANN REQUIRED)

if ( MSVC )
	SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${OUTPUT_DIRECTORY}")
	SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${OUTPUT_DIRECTORY}")
endif ( MSVC )

include_directories(
					${STIM_INCLUDE_DIRS}
          ${ANN_INCLUDE_DIR}
					${Boost_INCLUDE_DIR}
					)

#Assign source files to the appropriate variables
file(GLOB SRC_CPP "*.cpp")
file(GLOB SRC_H "*.h")

#create an executable file
add_executable(netmets
				${SRC_H}
				${SRC_CPP}
				)

#set the link libraries
target_link_libraries(netmets
						${CMAKE_THREAD_LIBS_INIT}
            ${ANN_LIBRARY}
						${X11_LIBRARIES}
		  )

#set up copying data files
configure_file(data/00_GT.obj ${CMAKE_CURRENT_BINARY_DIR}/00_GT.obj @ONLY)
configure_file(data/00_T.obj ${CMAKE_CURRENT_BINARY_DIR}/00_T.obj @ONLY)
configure_file(data/01_GT.obj ${CMAKE_CURRENT_BINARY_DIR}/01_GT.obj @ONLY)
configure_file(data/01_T.obj ${CMAKE_CURRENT_BINARY_DIR}/01_T.obj @ONLY)
configure_file(data/02_GT.obj ${CMAKE_CURRENT_BINARY_DIR}/02_GT.obj @ONLY)
configure_file(data/02_T.obj ${CMAKE_CURRENT_BINARY_DIR}/02_T.obj @ONLY)
configure_file(data/03_GT.obj ${CMAKE_CURRENT_BINARY_DIR}/03_GT.obj @ONLY)
configure_file(data/03_T.obj ${CMAKE_CURRENT_BINARY_DIR}/03_T.obj @ONLY)
configure_file(data/04_GT.obj ${CMAKE_CURRENT_BINARY_DIR}/04_GT.obj @ONLY)
configure_file(data/04_Ta.obj ${CMAKE_CURRENT_BINARY_DIR}/04_Ta.obj @ONLY)
configure_file(data/04_Tb.obj ${CMAKE_CURRENT_BINARY_DIR}/04_Tb.obj @ONLY)