Moved gui into subdirectory and split CMake build across main project and gui

This commit is contained in:
Travis Hunter 2023-02-10 19:10:49 -07:00
parent 8c1c4c9a12
commit 352fc5739f
3 changed files with 35 additions and 9 deletions

View File

@ -1,15 +1,36 @@
cmake_minimum_required(VERSION 3.0.0)
project(wxRocket VERSION 0.1.0)
project(
wxRocket
VERSION 0.1.0
DESCRIPTION "Model Rocket Simulation Application"
LANGUAGES CXX)
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD 17)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
include(CTest)
find_package(Doxygen)
if(Doxygen_FOUND)
add_subdirectory(docs)
else()
message(STATUS "Doxygen not found, not building docs")
endif()
endif()
enable_testing()
find_package(wxWidgets REQUIRED gl core base)
include(${wxWidgets_USE_FILE})
add_executable(wxRocket src/main.cpp)
add_subdirectory(src/gui)
target_link_libraries(wxRocket PRIVATE ${wxWidgets_LIBRARIES})
#find_package(wxWidgets REQUIRED gl core base)
#include(${wxWidgets_USE_FILE})
#add_executable(wxRocket src/main.cpp)
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)
#target_link_libraries(wxRocket PRIVATE ${wxWidgets_LIBRARIES})
#set(CPACK_PROJECT_NAME ${PROJECT_NAME})
#set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
#include(CPack)

5
src/gui/CMakeLists.txt Normal file
View File

@ -0,0 +1,5 @@
find_package(wxWidgets REQUIRED gl core base)
include(${wxWidgets_USE_FILE})
add_executable(wxRocket main.cpp)
target_link_libraries(wxRocket PRIVATE ${wxWidgets_LIBRARIES})