|
20 | 20 |
|
21 | 21 | # Editor target name |
22 | 22 | set(MAIN_TARGET_NAME "HotkeyEditor") |
23 | | - set(ACTUAL_EXE_NAME "LoadEditor") |
| 23 | + set(ACTUAL_EXE_NAME "GenHotkeys") |
24 | 24 |
|
25 | 25 | # Define editor executable |
26 | 26 | add_executable(${MAIN_TARGET_NAME}) |
|
39 | 39 |
|
40 | 40 | # Remove all GUI sources from main sources list |
41 | 41 | list(REMOVE_ITEM SOURCES ${EXCLUDED_GRAPHIC_SOURCES}) |
42 | | - |
43 | | - # Remove launch target source file from main sources list |
44 | | - list(REMOVE_ITEM SOURCES "MainStarter.cpp") |
45 | 42 |
|
46 | 43 | # Assign source files to the main target |
47 | 44 | target_sources( |
|
55 | 52 | set_target_properties( |
56 | 53 | ${MAIN_TARGET_NAME} |
57 | 54 | PROPERTIES |
58 | | - RUNTIME_OUTPUT_DIRECTORY ${PROJECT_DESTINATION_BIN_FOLDER} |
| 55 | + RUNTIME_OUTPUT_DIRECTORY ${PROJECT_DESTINATION_FOLDER} |
59 | 56 | OUTPUT_NAME ${ACTUAL_EXE_NAME} |
60 | 57 | ) |
61 | 58 |
|
|
67 | 64 |
|
68 | 65 | # Add graphic dependency to the main target |
69 | 66 | target_link_libraries(${MAIN_TARGET_NAME} PRIVATE GUI) |
70 | | - |
71 | | -# Starter target configuration |
72 | | - |
73 | | - # Starter target name |
74 | | - set(STARTER_TARGET_NAME "HotkeyEditorStarter") |
75 | | - |
76 | | - # Define starter executable with source files |
77 | | - add_executable( |
78 | | - ${STARTER_TARGET_NAME} |
79 | | - "MainStarter.cpp" |
80 | | - "GUI/QtSources/StarterDescription.rc" |
81 | | - ) |
82 | | - |
83 | | - # Define output directory and file name |
84 | | - set_target_properties( |
85 | | - ${STARTER_TARGET_NAME} |
86 | | - PROPERTIES |
87 | | - RUNTIME_OUTPUT_DIRECTORY ${PROJECT_DESTINATION_FOLDER} |
88 | | - OUTPUT_NAME ${MAIN_TARGET_NAME} |
89 | | - ) |
90 | | - |
91 | | - # Create a preprocessor variable with the path to the main program relative to the starter |
92 | | - target_compile_definitions(${STARTER_TARGET_NAME} PRIVATE |
93 | | - -DPROJECT_EXE_RELATIVE_PATH="$<PATH:RELATIVE_PATH,$<TARGET_FILE:${MAIN_TARGET_NAME}>,${PROJECT_DESTINATION_FOLDER}>" |
94 | | - ) |
95 | 67 |
|
96 | 68 | # Managing additional source files |
97 | 69 |
|
|
138 | 110 | find_program(QTENV_BAT qtenv2.bat) |
139 | 111 |
|
140 | 112 | if(CMAKE_BUILD_TYPE STREQUAL "Release") |
141 | | - |
142 | 113 | # Deploy Qt and other dlls to the Editor/Resource folder |
143 | 114 | add_custom_command( |
144 | 115 | TARGET ${MAIN_TARGET_NAME} |
|
149 | 120 | COMMAND ${WINDEPLOYQT_PROGRAM} |
150 | 121 | --compiler-runtime |
151 | 122 | --force |
152 | | - --dir $<TARGET_PROPERTY:${MAIN_TARGET_NAME},RUNTIME_OUTPUT_DIRECTORY> |
| 123 | + --dir ${PROJECT_DESTINATION_BIN_FOLDER} # Actually redirects qt's libraries to the different folder |
153 | 124 | $<TARGET_FILE:${MAIN_TARGET_NAME}> |
154 | 125 | ) |
155 | | - |
156 | | - endif() |
| 126 | + endif() |
0 commit comments