cevo-evo -> c-evo-evo

This commit is contained in:
Geoffray Levasseur committed 2026-10-29 11:32:32 +01:00
1 parent 89ef44503a
commit fb77f15654
194 files changed
+223 -223

No files matched your search

+20 -20
View File
@@ -1,4 +1,4 @@
# This file is part of cevo-evo.
# This file is part of c-evo-evo.
#
# This software is governed by the CeCILL license under French law and
# abiding by the rules of distribution of free software. You can use,
@@ -28,9 +28,9 @@
cmake_minimum_required(VERSION 3.16)
project(cevo-evo VERSION 0.1 LANGUAGES CXX)
project(c-evo-evo VERSION 0.1 LANGUAGES CXX)
option(CEVO_WITH_APP "Build the game application (widget/media + cevo-evo executable)" ON)
option(CEVO_WITH_APP "Build the game application (widget/media + c-evo-evo executable)" ON)
option(CEVO_WITH_AI "Build and install the bundled stdai AI plugin (turn off to rely on a third-party AI module instead)" ON)
if(NOT CEVO_WITH_APP AND NOT CEVO_WITH_AI)
message(FATAL_ERROR "Nothing to build: enable at least one of CEVO_WITH_APP or CEVO_WITH_AI")
@@ -53,9 +53,9 @@ include(GNUInstallDirs)
# Extra install dirs, following GNUInstallDirs' own CACHE PATH convention
# (relative to CMAKE_INSTALL_PREFIX unless given as an absolute path).
set(CMAKE_INSTALL_AIDIR "${CMAKE_INSTALL_LIBDIR}/cevo-evo/ai" CACHE PATH
set(CMAKE_INSTALL_AIDIR "${CMAKE_INSTALL_LIBDIR}/c-evo-evo/ai" CACHE PATH
"AI plugin modules (e.g. stdai) - where the game looks for loadable AI brains")
set(CMAKE_INSTALL_RESOURCEDIR "${CMAKE_INSTALL_DATADIR}/cevo-evo" CACHE PATH
set(CMAKE_INSTALL_RESOURCEDIR "${CMAKE_INSTALL_DATADIR}/c-evo-evo" CACHE PATH
"Game resources (graphics, music, sounds, resource translations)")
foreach(_cevo_dir AIDIR RESOURCEDIR)
if(IS_ABSOLUTE "${CMAKE_INSTALL_${_cevo_dir}}")
@@ -71,7 +71,7 @@ if(CEVO_WITH_APP OR CEVO_WITH_AI)
add_subdirectory(ai)
endif()
# stdai is a dynamically-loaded AI plugin (see ai/stdai/CMakeLists.txt): built
# here but deliberately NOT linked into the cevo-evo target below.
# here but deliberately NOT linked into the c-evo-evo target below.
if(CEVO_WITH_AI)
add_subdirectory(ai/stdai)
endif()
@@ -83,7 +83,7 @@ if(CEVO_WITH_APP)
add_subdirectory(game)
add_subdirectory(resources)
set(TS_FILES cevo-evo_en_US.ts)
set(TS_FILES c-evo-evo_en_US.ts)
set(PROJECT_SOURCES
main.cpp
@@ -117,25 +117,25 @@ set(PROJECT_SOURCES
)
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
qt_add_executable(cevo-evo
qt_add_executable(c-evo-evo
MANUAL_FINALIZATION
${PROJECT_SOURCES}
)
# Define target properties for Android with Qt 6 as:
# set_property(TARGET cevo-evo APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
# set_property(TARGET c-evo-evo APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
# ${CMAKE_CURRENT_SOURCE_DIR}/android)
# For more information, see https://doc.qt.io/qt-6/qt-add-executable.html#target-creation
qt_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
else()
if(ANDROID)
add_library(cevo-evo SHARED
add_library(c-evo-evo SHARED
${PROJECT_SOURCES}
)
# Define properties for Android with Qt 5 after find_package() calls as:
# set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
else()
add_executable(cevo-evo
add_executable(c-evo-evo
${PROJECT_SOURCES}
)
endif()
@@ -143,18 +143,18 @@ else()
qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
endif()
target_link_libraries(cevo-evo PRIVATE Qt${QT_VERSION_MAJOR}::Widgets dpiwidgets cevowidgets uosmedia cevocommon cevogame cevoai)
target_link_libraries(c-evo-evo PRIVATE Qt${QT_VERSION_MAJOR}::Widgets dpiwidgets cevowidgets uosmedia cevocommon cevogame cevoai)
# dpiwidgets/cevowidgets/uosmedia are installed to lib/cevo-evo (not the
# dpiwidgets/cevowidgets/uosmedia are installed to lib/c-evo-evo (not the
# default library directory), so the installed binary needs an explicit
# rpath to find them at runtime.
set_target_properties(cevo-evo PROPERTIES
INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}/cevo-evo"
set_target_properties(c-evo-evo PROPERTIES
INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}/c-evo-evo"
)
# Default, compile-time-known locations the game looks for its AI plugins
# and its resources (graphics/music/sounds/translations) at runtime.
target_compile_definitions(cevo-evo PRIVATE
target_compile_definitions(c-evo-evo PRIVATE
CEVO_AI_DIR="${CMAKE_INSTALL_FULL_AIDIR}"
CEVO_RESOURCE_DIR="${CMAKE_INSTALL_FULL_RESOURCEDIR}"
)
@@ -163,9 +163,9 @@ target_compile_definitions(cevo-evo PRIVATE
# If you are developing for iOS or macOS you should consider setting an
# explicit, fixed bundle identifier manually though.
if(${QT_VERSION} VERSION_LESS 6.1.0)
set(BUNDLE_ID_OPTION MACOSX_BUNDLE_GUI_IDENTIFIER com.example.cevo-evo)
set(BUNDLE_ID_OPTION MACOSX_BUNDLE_GUI_IDENTIFIER com.example.c-evo-evo)
endif()
set_target_properties(cevo-evo PROPERTIES
set_target_properties(c-evo-evo PROPERTIES
${BUNDLE_ID_OPTION}
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
@@ -173,13 +173,13 @@ set_target_properties(cevo-evo PROPERTIES
WIN32_EXECUTABLE TRUE
)
install(TARGETS cevo-evo
install(TARGETS c-evo-evo
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
if(QT_VERSION_MAJOR EQUAL 6)
qt_finalize_executable(cevo-evo)
qt_finalize_executable(c-evo-evo)
endif()
endif() # CEVO_WITH_APP