Move glut frontend to its own subdir

pull/3/head
Hleb Valoshka 2019-11-15 18:25:00 +03:00
parent fbd83e5587
commit 6be3afb1e6
3 changed files with 13 additions and 18 deletions

View File

@ -56,21 +56,7 @@ cotire(celestia)
#install(TARGETS celestia LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
# celestia-glut binary
if(ENABLE_GLUT)
find_package(GLUT)
if(NOT GLUT_FOUND)
message(WARNING "GLUT library isn't found, not building GLUT fronend.")
else()
set(GLUT_SOURCES glutmain.cpp)
add_executable(celestia-glut ${GLUT_SOURCES})
cotire(celestia-glut)
target_include_directories(celestia-glut PRIVATE ${GLUT_INCLUDE_DIR})
target_link_libraries(celestia-glut ${CELESTIA_LIBS} ${GLUT_LIBRARIES})
install(TARGETS celestia-glut RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
endif()
add_subdirectory(glut)
add_subdirectory(gtk)
add_subdirectory(qt)
add_subdirectory(win32)

View File

@ -0,0 +1,11 @@
if(NOT ENABLE_GLUT)
message(STATUS "GLUT frontend is disabled.")
return()
endif()
find_package(GLUT REQUIRED)
set(GLUT_SOURCES glutmain.cpp)
add_executable(celestia-glut ${GLUT_SOURCES})
target_include_directories(celestia-glut PRIVATE ${GLUT_INCLUDE_DIR})
target_link_libraries(celestia-glut ${CELESTIA_LIBS} ${GLUT_LIBRARIES})
install(TARGETS celestia-glut RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

View File

@ -30,7 +30,7 @@
#include <celutil/debug.h>
#include <celmath/mathlib.h>
#include <celengine/astro.h>
#include "celestiacore.h"
#include <celestia/celestiacore.h>
/* what are you supposed to be?
#include "popt.h"
*/
@ -551,5 +551,3 @@ int main(int argc, char* argv[])
return 0;
}