equal
deleted
inserted
replaced
57 uTeams.pas |
57 uTeams.pas |
58 uTextures.pas |
58 uTextures.pas |
59 uTypes.pas |
59 uTypes.pas |
60 uUtils.pas |
60 uUtils.pas |
61 uVariables.pas |
61 uVariables.pas |
|
62 uVideoRec.pas |
62 uVisualGears.pas |
63 uVisualGears.pas |
63 uWorld.pas |
64 uWorld.pas |
64 GSHandlers.inc |
65 GSHandlers.inc |
65 VGSHandlers.inc |
66 VGSHandlers.inc |
66 ArgParsers.inc |
67 ArgParsers.inc |
180 endif() |
181 endif() |
181 endif() |
182 endif() |
182 |
183 |
183 set(fpc_flags ${noexecstack_flags} ${pascal_flags} ${hwengine_project}) |
184 set(fpc_flags ${noexecstack_flags} ${pascal_flags} ${hwengine_project}) |
184 |
185 |
|
186 IF (WIN32) |
|
187 set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) |
|
188 include_directories(${CMAKE_SOURCE_DIR}/misc/winutils/include) |
|
189 link_directories(${CMAKE_SOURCE_DIR}/misc/winutils/lib) |
|
190 add_library(avwrapper SHARED avwrapper.c) |
|
191 target_link_libraries(avwrapper avcodec avformat avutil) |
|
192 ELSE() |
|
193 add_library(avwrapper STATIC avwrapper.c) |
|
194 ENDIF() |
185 |
195 |
186 IF(NOT APPLE) |
196 IF(NOT APPLE) |
187 #here is the command for standard executables or for shared library |
197 #here is the command for standard executables or for shared library |
188 add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}${CMAKE_EXECUTABLE_SUFFIX}" |
198 add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}${CMAKE_EXECUTABLE_SUFFIX}" |
189 COMMAND "${fpc_executable}" |
199 COMMAND "${fpc_executable}" |
220 endif() |
230 endif() |
221 |
231 |
222 #this command is a workaround to some inlining issues present in older |
232 #this command is a workaround to some inlining issues present in older |
223 # FreePascal versions and fixed in 2.6, That version is mandatory on OSX, |
233 # FreePascal versions and fixed in 2.6, That version is mandatory on OSX, |
224 # hence the command is not needed there |
234 # hence the command is not needed there |
225 if(NOT APPLE) |
235 # if(NOT APPLE) |
226 add_custom_target(ENGINECLEAN COMMAND ${CMAKE_BUILD_TOOL} "clean" "${PROJECT_BINARY_DIR}" "${hedgewars_SOURCE_DIR}/hedgewars") |
236 # add_custom_target(ENGINECLEAN COMMAND ${CMAKE_BUILD_TOOL} "clean" "${PROJECT_BINARY_DIR}" "${hedgewars_SOURCE_DIR}/hedgewars") |
227 add_dependencies(${engine_output_name} ENGINECLEAN) |
237 # add_dependencies(${engine_output_name} ENGINECLEAN) |
228 endif() |
238 # endif() |
229 |
239 |
230 install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ${target_dir}) |
240 install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ${target_dir}) |
231 |
241 IF (WIN32) |
|
242 install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}avwrapper${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION ${target_dir}) |
|
243 ENDIF() |