-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* #195: Moved vessel thumbnails to individual vessel projects. Thumbnails are copied to expected target directory on build and install so they show up in scenario editor. Added some more vessel project for non-code vessel classes. * #195: some additional abstraction in vessel cmake files.
- Loading branch information
1 parent
1cc1730
commit bc229e3
Showing
39 changed files
with
378 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,73 @@ | ||
# Copyright (c) Martin Schweiger | ||
# Licensed under the MIT License | ||
|
||
set(VESSEL_NAME Atlantis_Tank) | ||
set(INSTALL_SUBDIR Atlantis) | ||
|
||
set(MESH_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Meshes) | ||
set(TEXTURE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Textures) | ||
set(CONFIG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Config) | ||
set(THUMBNAIL_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Thumbnail) | ||
|
||
add_library(Atlantis_Tank SHARED | ||
add_library(${VESSEL_NAME} SHARED | ||
Atlantis_Tank.cpp | ||
) | ||
|
||
set_target_properties(Atlantis_Tank | ||
set_target_properties(${VESSEL_NAME} | ||
PROPERTIES | ||
FOLDER Vessels | ||
FOLDER Vessels/${VESSEL_NAME} | ||
) | ||
|
||
target_include_directories(Atlantis_Tank | ||
target_include_directories(${VESSEL_NAME} | ||
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../Atlantis | ||
PUBLIC ${ORBITER_SOURCE_SDK_INCLUDE_DIR} | ||
) | ||
|
||
target_link_libraries(Atlantis_Tank | ||
target_link_libraries(${VESSEL_NAME} | ||
${ORBITER_LIB} | ||
${ORBITER_SDK_LIB} | ||
$<TARGET_LINKER_FILE:Atlantis_SRB> | ||
) | ||
|
||
add_custom_command( | ||
TARGET Atlantis_Tank PRE_BUILD | ||
TARGET ${VESSEL_NAME} PRE_BUILD | ||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CONFIG_SOURCE_DIR}/ ${CMAKE_BINARY_DIR}/Config/Vessels | ||
) | ||
|
||
add_custom_command( | ||
TARGET Atlantis_Tank PRE_BUILD | ||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${MESH_SOURCE_DIR}/ ${CMAKE_BINARY_DIR}/Meshes/Atlantis | ||
TARGET ${VESSEL_NAME} PRE_BUILD | ||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${MESH_SOURCE_DIR}/ ${ORBITER_BINARY_MESH_DIR}/${INSTALL_SUBDIR} | ||
) | ||
|
||
add_custom_command( | ||
TARGET Atlantis_Tank PRE_BUILD | ||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${TEXTURE_SOURCE_DIR}/ ${ORBITER_BINARY_TEXTURES_DIR}/Atlantis | ||
TARGET ${VESSEL_NAME} PRE_BUILD | ||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${TEXTURE_SOURCE_DIR}/ ${ORBITER_BINARY_TEXTURES_DIR}/${INSTALL_SUBDIR} | ||
) | ||
|
||
add_dependencies(Atlantis_Tank | ||
add_custom_command( | ||
TARGET ${VESSEL_NAME} PRE_BUILD | ||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${THUMBNAIL_SOURCE_DIR}/ ${CMAKE_BINARY_DIR}/Images/Vessels/Default | ||
) | ||
|
||
add_dependencies(${VESSEL_NAME} | ||
${OrbiterTgt} | ||
Orbitersdk | ||
Atlantis_SRB | ||
) | ||
|
||
install(TARGETS Atlantis_Tank | ||
install(TARGETS ${VESSEL_NAME} | ||
RUNTIME | ||
DESTINATION ${ORBITER_INSTALL_MODULE_DIR} | ||
) | ||
install(DIRECTORY ${CONFIG_SOURCE_DIR}/ | ||
DESTINATION ${ORBITER_INSTALL_ROOT_DIR}/Config/Vessels | ||
) | ||
install(DIRECTORY ${MESH_SOURCE_DIR}/ | ||
DESTINATION ${ORBITER_INSTALL_ROOT_DIR}/Meshes/Atlantis | ||
DESTINATION ${ORBITER_INSTALL_MESH_DIR}/${INSTALL_SUBDIR} | ||
) | ||
install(DIRECTORY ${TEXTURE_SOURCE_DIR}/ | ||
DESTINATION ${ORBITER_INSTALL_TEXTURES_DIR}/Atlantis | ||
DESTINATION ${ORBITER_INSTALL_TEXTURES_DIR}/${INSTALL_SUBDIR} | ||
) | ||
install(DIRECTORY ${THUMBNAIL_SOURCE_DIR}/ | ||
DESTINATION ${ORBITER_INSTALL_ROOT_DIR}/Images/Vessels/Default | ||
) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.