Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set unique names for utility programs #5826

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ add_source_folders(UNITTEST UNITTEST_SRC_FOLDERS)
add_executable(${PROJECT_NAME} WIN32 src/main.cpp ${RESOURCES})
add_executable(unittest ${UNITTEST_CXX_FILES})
add_executable(modelcompiler src/modelcompiler.cpp)
set_target_properties(modelcompiler PROPERTIES OUTPUT_NAME pioneer-modelcompiler)
add_executable(savegamedump
src/savegamedump.cpp
src/JsonUtils.cpp
Expand All @@ -345,6 +346,7 @@ add_executable(savegamedump
src/Lang.cpp
${FILESYSTEM_CXX_FILES}
)
set_target_properties(savegamedump PROPERTIES OUTPUT_NAME pioneer-savegamedump)

find_program(NATURALDOCS NAMES naturaldocs)
if (NATURALDOCS)
Expand Down Expand Up @@ -406,7 +408,7 @@ if(MSVC)
endif(MSVC)

if (CMAKE_CROSSCOMPILING)
find_program(MODELCOMPILER modelcompiler DOC "modelcompiler executable for the host")
find_program(MODELCOMPILER pioneer-modelcompiler DOC "modelcompiler executable for the host")
else (CMAKE_CROSSCOMPILING)
set(MODELCOMPILER $<TARGET_FILE:modelcompiler>)
endif (CMAKE_CROSSCOMPILING)
Expand Down
9 changes: 5 additions & 4 deletions src/editor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,20 @@ list(REMOVE_ITEM EDITOR_CXX_FILES
)

# Creates a library, adds it to the build, and sets C++ target properties on it
define_pioneer_library(pioneer-editor EDITOR_CXX_FILES EDITOR_HXX_FILES)
target_include_directories(pioneer-editor PRIVATE ${CMAKE_BINARY_DIR})
target_link_libraries(pioneer-editor LINK_PRIVATE
define_pioneer_library(pioneer-editor-lib EDITOR_CXX_FILES EDITOR_HXX_FILES)
target_include_directories(pioneer-editor-lib PRIVATE ${CMAKE_BINARY_DIR})
target_link_libraries(pioneer-editor-lib LINK_PRIVATE
pioneer-core
pioneer-lib
)

list(APPEND EDITOR_LIBRARIES
pioneer-editor
pioneer-editor-lib
pioneer-core
)

add_executable(editor WIN32 editormain.cpp ${RESOURCES})
set_cxx_properties(editor)
target_link_libraries(editor LINK_PRIVATE ${EDITOR_LIBRARIES} ${pioneerLibs} ${winLibs})
set_target_properties(editor PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set_target_properties(editor PROPERTIES OUTPUT_NAME pioneer-editor)
Loading