Renamed src to colobot-base and colobotbase target to Colobot-Base
parent
7fe75e20ad
commit
434bd0bd3a
|
@ -436,8 +436,8 @@ add_subdirectory(colobot-common)
|
||||||
# Add CBot
|
# Add CBot
|
||||||
add_subdirectory(CBot)
|
add_subdirectory(CBot)
|
||||||
|
|
||||||
# Subdirectory with sources
|
# Add base Colobot implementation
|
||||||
add_subdirectory(src)
|
add_subdirectory(colobot-base)
|
||||||
|
|
||||||
# Add Colobot executable
|
# Add Colobot executable
|
||||||
add_subdirectory(colobot-app)
|
add_subdirectory(colobot-app)
|
||||||
|
|
|
@ -8,14 +8,14 @@ target_sources(colobot PRIVATE
|
||||||
)
|
)
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
target_compile_options(colobotbase PRIVATE /utf-8)
|
target_compile_options(colobot PRIVATE /utf-8)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(PLATFORM_WINDOWS)
|
if(PLATFORM_WINDOWS)
|
||||||
target_sources(colobot PRIVATE ${PROJECT_BINARY_DIR}/desktop/colobot.rc)
|
target_sources(colobot PRIVATE ${PROJECT_BINARY_DIR}/desktop/colobot.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(colobot colobotbase SDL2::Main)
|
target_link_libraries(colobot Colobot-Base SDL2::Main)
|
||||||
|
|
||||||
if(COLOBOT_HIDE_CONSOLE)
|
if(COLOBOT_HIDE_CONSOLE)
|
||||||
set_target_properties(colobot PROPERTIES WIN32_EXECUTABLE TRUE)
|
set_target_properties(colobot PROPERTIES WIN32_EXECUTABLE TRUE)
|
||||||
|
|
|
@ -26,7 +26,7 @@ configure_file(common/config.h.cmake "${CMAKE_CURRENT_BINARY_DIR}/common/config.
|
||||||
configure_file(common/version.h.cmake "${CMAKE_CURRENT_BINARY_DIR}/common/version.h")
|
configure_file(common/version.h.cmake "${CMAKE_CURRENT_BINARY_DIR}/common/version.h")
|
||||||
|
|
||||||
# Todo: split this monstrosity into smaller libraries (graphics, math, ui, etc.)
|
# Todo: split this monstrosity into smaller libraries (graphics, math, ui, etc.)
|
||||||
add_library(colobotbase STATIC
|
add_library(Colobot-Base STATIC
|
||||||
app/app.cpp
|
app/app.cpp
|
||||||
app/app.h
|
app/app.h
|
||||||
app/controller.cpp
|
app/controller.cpp
|
||||||
|
@ -484,14 +484,14 @@ add_library(colobotbase STATIC
|
||||||
ui/studio.h
|
ui/studio.h
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(colobotbase PUBLIC
|
target_include_directories(Colobot-Base PUBLIC
|
||||||
${CMAKE_CURRENT_LIST_DIR}
|
${CMAKE_CURRENT_LIST_DIR}
|
||||||
${CMAKE_CURRENT_LIST_DIR}/..
|
${CMAKE_CURRENT_LIST_DIR}/..
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
# Main libraries
|
# Main libraries
|
||||||
target_link_libraries(colobotbase PUBLIC
|
target_link_libraries(Colobot-Base PUBLIC
|
||||||
CBot
|
CBot
|
||||||
Colobot-Common
|
Colobot-Common
|
||||||
localename
|
localename
|
||||||
|
@ -509,7 +509,7 @@ target_link_libraries(colobotbase PUBLIC
|
||||||
|
|
||||||
# Optional libraries
|
# Optional libraries
|
||||||
if(OPENAL_SOUND)
|
if(OPENAL_SOUND)
|
||||||
target_sources(colobotbase PRIVATE
|
target_sources(Colobot-Base PRIVATE
|
||||||
sound/oalsound/alsound.cpp
|
sound/oalsound/alsound.cpp
|
||||||
sound/oalsound/buffer.cpp
|
sound/oalsound/buffer.cpp
|
||||||
sound/oalsound/channel.cpp
|
sound/oalsound/channel.cpp
|
||||||
|
@ -519,15 +519,15 @@ if(OPENAL_SOUND)
|
||||||
sound/oalsound/channel.h
|
sound/oalsound/channel.h
|
||||||
sound/oalsound/check.h
|
sound/oalsound/check.h
|
||||||
)
|
)
|
||||||
target_link_libraries(colobotbase PUBLIC OpenAL::OpenAL)
|
target_link_libraries(Colobot-Base PUBLIC OpenAL::OpenAL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WINGETOPT)
|
if(WINGETOPT)
|
||||||
target_link_libraries(colobotbase PUBLIC wingetopt)
|
target_link_libraries(Colobot-Base PUBLIC wingetopt)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
target_compile_options(colobotbase PRIVATE /utf-8)
|
target_compile_options(Colobot-Base PRIVATE /utf-8)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Additional libraries per platform
|
# Additional libraries per platform
|
||||||
|
@ -547,7 +547,7 @@ if(PLATFORM_WINDOWS)
|
||||||
find_library(BROTLIENC_LIBRARY NAMES brotlienc-static)
|
find_library(BROTLIENC_LIBRARY NAMES brotlienc-static)
|
||||||
find_library(BROTLIDEC_LIBRARY NAMES brotlidec-static)
|
find_library(BROTLIDEC_LIBRARY NAMES brotlidec-static)
|
||||||
|
|
||||||
target_link_libraries(colobotbase PUBLIC
|
target_link_libraries(Colobot-Base PUBLIC
|
||||||
Gettext::Intl
|
Gettext::Intl
|
||||||
${BZ2_LIBRARY}
|
${BZ2_LIBRARY}
|
||||||
${FREETYPE_LIBRARY}
|
${FREETYPE_LIBRARY}
|
||||||
|
@ -570,19 +570,19 @@ if(PLATFORM_WINDOWS)
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
target_link_libraries(colobotbase PUBLIC -lintl)
|
target_link_libraries(Colobot-Base PUBLIC -lintl)
|
||||||
endif()
|
endif()
|
||||||
elseif(PLATFORM_GNU)
|
elseif(PLATFORM_GNU)
|
||||||
# nothing
|
# nothing
|
||||||
elseif(PLATFORM_LINUX)
|
elseif(PLATFORM_LINUX)
|
||||||
# for clock_gettime
|
# for clock_gettime
|
||||||
target_link_libraries(colobotbase PUBLIC -lrt)
|
target_link_libraries(Colobot-Base PUBLIC -lrt)
|
||||||
elseif(PLATFORM_MACOSX)
|
elseif(PLATFORM_MACOSX)
|
||||||
find_package(Intl REQUIRED)
|
find_package(Intl REQUIRED)
|
||||||
target_link_libraries(colobotbase PUBLIC Gettext::Intl)
|
target_link_libraries(Colobot-Base PUBLIC Gettext::Intl)
|
||||||
elseif(PLATFORM_FREEBSD)
|
elseif(PLATFORM_FREEBSD)
|
||||||
find_package(Intl REQUIRED)
|
find_package(Intl REQUIRED)
|
||||||
target_link_libraries(colobotbase PUBLIC Gettext::Intl)
|
target_link_libraries(Colobot-Base PUBLIC Gettext::Intl)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
@ -590,5 +590,5 @@ set(COLOBOT_LIBS ${LIBS} PARENT_SCOPE)
|
||||||
|
|
||||||
# Linter-specific
|
# Linter-specific
|
||||||
if(COLOBOT_LINT_BUILD)
|
if(COLOBOT_LINT_BUILD)
|
||||||
add_fake_header_sources("src" colobotbase)
|
add_fake_header_sources("src" Colobot-Base)
|
||||||
endif()
|
endif()
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue