mirror of
https://gitlab.com/manzerbredes/cgeditor.git
synced 2025-04-19 03:59:44 +00:00
Create project
This commit is contained in:
commit
a359219e33
24 changed files with 2152 additions and 0 deletions
25
CMakeLists.txt
Normal file
25
CMakeLists.txt
Normal file
|
@ -0,0 +1,25 @@
|
|||
cmake_minimum_required(VERSION 3.22)
|
||||
project(cgeditor)
|
||||
|
||||
# Includes
|
||||
set(CGEDITOR_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/includes) # For conveniance
|
||||
set(CGEDITOR_INCLUDE_DIR ${CGEDITOR_INCLUDE_DIR} PARENT_SCOPE) # To be used by other projects with add_subdirectory()
|
||||
file(MAKE_DIRECTORY ${CGEDITOR_INCLUDE_DIR})
|
||||
# Copy all includes
|
||||
file(GLOB_RECURSE HEADER_FILES src/*.hpp)
|
||||
file(MAKE_DIRECTORY ${CGEDITOR_INCLUDE_DIR}/components)
|
||||
foreach(FILE ${HEADER_FILES})
|
||||
file(RELATIVE_PATH FILE_SUBDIR ${CMAKE_CURRENT_SOURCE_DIR}/src ${FILE})
|
||||
configure_file(${FILE} ${CGEDITOR_INCLUDE_DIR}/${FILE_SUBDIR} COPYONLY)
|
||||
endforeach(FILE ${HEADER_FILES})
|
||||
|
||||
# Compile cgeditor
|
||||
include_directories(src)
|
||||
file(GLOB_RECURSE SRC_CPP_FILES src/*.cpp)
|
||||
add_library(cgeditor SHARED ${SRC_CPP_FILES})
|
||||
|
||||
# Examples
|
||||
set(COMPILE_EXAMPLES FALSE CACHE BOOL "Compiling included examples")
|
||||
if(COMPILE_EXAMPLES)
|
||||
add_subdirectory("examples/wxWidgets/")
|
||||
endif()
|
Loading…
Add table
Add a link
Reference in a new issue