]> git.cworth.org Git - vogl/commitdiff
Reworked glxspheres/CMakeLists.txt
authorGregory King <greg.james.king@gmail.com>
Mon, 17 Mar 2014 19:46:56 +0000 (12:46 -0700)
committerCarl Worth <cworth@cworth.org>
Tue, 1 Apr 2014 19:37:30 +0000 (12:37 -0700)
  (1) find_package(GLU REQUIRED);
  (2) added the variable glxsphere_SRC (instead of aux_source_directory);
  (3) added appropriate entry to within target_link_libraries (GLU_LIBRARIES).

src/glxspheres/CMakeLists.txt

index e96910ee33ad3c48c157e7c3403df930f4f39d4f..2fb7915243b42b5f0421c92070c118ab044af342 100644 (file)
@@ -3,19 +3,16 @@ cmake_minimum_required(VERSION 2.8)
 
 include("${SRC_DIR}/build_options.cmake")
 find_package(X11 REQUIRED)
+find_package(GLU REQUIRED)
 
-aux_source_directory(. SRC_LIST)
+set(glxsphere_SRC glxspheres.c)
 
-include_directories(
-       ${PROJECT_SOURCE_DIR}/../include
-    )
-
-add_executable(${PROJECT_NAME} ${SRC_LIST})
+add_executable(${PROJECT_NAME} ${glxsphere_SRC})
 
 target_link_libraries(${PROJECT_NAME}
     ${X11_X11_LIB}
     ${OPENGL_LIBRARY}
     m
-    GLU)
+    ${GLU_LIBRARIES})
 
 build_options_finalize()