瀏覽代碼

fix compilation on Gentoo and probably most distributions

closes #56
Foster McLane 7 年之前
父節點
當前提交
24ca6151d1
共有 1 個檔案被更改,包括 9 行新增6 行删除
  1. 9
    6
      CMakeLists.txt

+ 9
- 6
CMakeLists.txt 查看文件

@@ -47,6 +47,8 @@ set_property(TARGET ${LIBRARY_NAME} PROPERTY CXX_STANDARD_REQUIRED ON)
47 47
 add_executable(${EXECUTABLE_NAME} src/options.cpp
48 48
                                   src/main.cpp)
49 49
 
50
+set_property(TARGET ${EXECUTABLE_NAME} PROPERTY CXX_STANDARD 11)
51
+
50 52
 set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/modules" )
51 53
 
52 54
 find_package(GLM REQUIRED)
@@ -61,12 +63,13 @@ include_directories(${X11_INCLUDE_DIR}
61 63
                     ${GLX_INCLUDE_DIR}
62 64
                     ${OPENGL_INCLUDE_DIR})
63 65
 
64
-target_link_libraries(${EXECUTABLE_NAME} ${X11_LIBRARIES}
65
-                                         ${GLM_LIBRARIES}
66
-                                         ${OPENGL_LIBRARIES}
67
-                                         ${GLX_LIBRARY}
68
-                                         ${XEXT_LIBRARIES}
69
-                                         ${LIBRARY_NAME})
66
+target_link_libraries(${LIBRARY_NAME} ${X11_LIBRARIES}
67
+                                      ${GLM_LIBRARIES}
68
+                                      ${OPENGL_LIBRARIES}
69
+                                      ${GLX_LIBRARY}
70
+                                      ${XEXT_LIBRARIES})
71
+
72
+target_link_libraries(${EXECUTABLE_NAME} ${LIBRARY_NAME})
70 73
 
71 74
 install( TARGETS ${EXECUTABLE_NAME} DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" )
72 75
 install( TARGETS ${LIBRARY_NAME} DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" )