Browse Source

Merge pull request #57 from fkmclane/master

fix compilation on Gentoo and probably most distributions
Dalton Nell 7 years ago
parent
commit
1fd9f104c0
1 changed files with 9 additions and 6 deletions
  1. 9
    6
      CMakeLists.txt

+ 9
- 6
CMakeLists.txt View File

47
 add_executable(${EXECUTABLE_NAME} src/options.cpp
47
 add_executable(${EXECUTABLE_NAME} src/options.cpp
48
                                   src/main.cpp)
48
                                   src/main.cpp)
49
 
49
 
50
+set_property(TARGET ${EXECUTABLE_NAME} PROPERTY CXX_STANDARD 11)
51
+
50
 set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/modules" )
52
 set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/modules" )
51
 
53
 
52
 find_package(GLM REQUIRED)
54
 find_package(GLM REQUIRED)
61
                     ${GLX_INCLUDE_DIR}
63
                     ${GLX_INCLUDE_DIR}
62
                     ${OPENGL_INCLUDE_DIR})
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
 install( TARGETS ${EXECUTABLE_NAME} DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" )
74
 install( TARGETS ${EXECUTABLE_NAME} DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" )
72
 install( TARGETS ${LIBRARY_NAME} DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" )
75
 install( TARGETS ${LIBRARY_NAME} DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" )