#Specify the version being used aswell as the language cmake_minimum_required(VERSION 2.8) #Name your project here project(Texture_Test) #set the module directory set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}") #MESSAGE("CMAKE_SOURCE_DIR "${CMAKE_SOURCE_DIR}) #MESSAGE("CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}) #find cuda find_package(CUDA REQUIRED) #find glut find_package(GLUT REQUIRED) #find glew find_package(GLEW REQUIRED) #find OpenGL find_package(OpenGL REQUIRED) #find Jpeg find_package(JPEG REQUIRED) #find BOOST - particularly the filesystem libraries set(Boost_USE_STATIC_LIBS ON) find_package(Boost 1.5.0 COMPONENTS filesystem system regex REQUIRED) #find the pthreads package find_package(Threads) #find the X11 package find_package(X11) #include directories include_directories(${CUDA_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIRS} ${GLEW_INCLUDE_PATH} ${GLUT_INCLUDE_DIRS} ${JPEG_INCLUDE_DIRS} ) #link_directories(${GLUT_LIBRARY_DIRS} ${OpenGL_LIBRARY_DIRS}) #add_definitions(${GLUT_DEFINITIONS} ${OpenGL_DEFINITIONS}) #Assign source files to the appropriate variables file(GLOB SRC_CPP "*.cpp") file(GLOB SRC_H "*.h") file(GLOB SRC_CU "*.cu") #create an executable file cuda_add_executable(Texture_Test ${SRC_H} ${SRC_CPP} ${SRC_CU}) cuda_add_cublas_to_target(Texture_Test) #set the link libraries target_link_libraries(Texture_Test ${CMAKE_THREAD_LIBS_INIT} ${X11_LIBRARIES} ${Boost_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${GLEW_LIBRARY} ${GLUT_glut_LIBRARY} ${JPEG_LIBRARY} )