if( ${UNIX} )
	include_directories("${PROJECT_BINARY_DIR}/lib")
        include_directories("${PROJECT_SOURCE_DIR}/lib")
        link_directories("${PROJECT_SOURCE_DIR}/lib/NGT")

	add_executable(ngt_exe ngt.cpp)
	add_dependencies(ngt_exe ngt)
        set_target_properties(ngt_exe PROPERTIES OUTPUT_NAME ngt)
	if(CMAKE_VERSION VERSION_LESS 3.1)
		target_link_libraries(ngt_exe ngt pthread)
	else()
		target_link_libraries(ngt_exe ngt Threads::Threads)
	endif()
	install(TARGETS ngt_exe RUNTIME DESTINATION bin)
endif()

if(WIN32)
	include_directories("${PROJECT_BINARY_DIR}/lib")
	include_directories("${PROJECT_SOURCE_DIR}/lib")
	link_directories("${PROJECT_SOURCE_DIR}/lib/NGT")

	add_executable(ngt_exe ngt.cpp)
	add_dependencies(ngt_exe ngtstatic)
	set_target_properties(ngt_exe PROPERTIES OUTPUT_NAME ngt)
	target_link_libraries(ngt_exe ngtstatic Threads::Threads)
	if(TARGET OpenMP::OpenMP_CXX)
		target_link_libraries(ngt_exe OpenMP::OpenMP_CXX)
	endif()
	install(TARGETS ngt_exe RUNTIME DESTINATION bin)
endif()
