Skip to content

Commit

Permalink
Fix CMake command paths
Browse files Browse the repository at this point in the history
  • Loading branch information
SupSuper committed Mar 9, 2019
1 parent 80b31dd commit 5ba1c35
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 46 deletions.
2 changes: 1 addition & 1 deletion framework/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ option(BACKTRACE_ON_ERROR "Print backtrace on logging an error (Requires libunwi
option(DIALOG_ON_ERROR "Pop up a dialog box showing errors" ON)


set (FRAMEWORK_SOURCE_FILES
set (FRAMEWORK_SOURCE_FILES
configfile.cpp
data.cpp
event.cpp
Expand Down
40 changes: 20 additions & 20 deletions game/state/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ set (GAMESTATE_SOURCE_FILES
battle/ai/unitaihelper.cpp
battle/ai/unitailowmorale.cpp
battle/ai/unitaivanilla.cpp

battle/battle.cpp
battle/battledoor.cpp
battle/battleexplosion.cpp
Expand All @@ -35,7 +35,7 @@ set (GAMESTATE_SOURCE_FILES
battle/battlescanner.cpp
battle/battleunit.cpp
battle/battleunitmission.cpp

city/agentmission.cpp
city/base.cpp
city/building.cpp
Expand All @@ -47,15 +47,15 @@ set (GAMESTATE_SOURCE_FILES
city/vehicle.cpp
city/vehiclemission.cpp
city/vequipment.cpp

rules/battle/battlemap.cpp
rules/battle/battlemapsector.cpp
rules/battle/battlemapparttype.cpp
rules/battle/battleunitanimationpack.cpp
rules/battle/battleunitimagepack.cpp
rules/battle/battlemaptileset.cpp
rules/battle/damage.cpp

rules/city/baselayout.cpp
rules/city/facilitytype.cpp
rules/city/scenerytiletype.cpp
Expand All @@ -66,18 +66,18 @@ set (GAMESTATE_SOURCE_FILES
rules/city/vammotype.cpp
rules/city/vehicletype.cpp
rules/city/vequipmenttype.cpp

rules/aequipmenttype.cpp
rules/agenttype.cpp
rules/doodadtype.cpp
rules/supportedmappart.cpp

shared/aequipment.cpp
shared/agent.cpp
shared/doodad.cpp
shared/organisation.cpp
shared/projectile.cpp

gameevent.cpp
gamestate.cpp
gamestate_serialize.cpp
Expand All @@ -88,7 +88,7 @@ set (GAMESTATE_SOURCE_FILES
luagamestate_support_generated.cpp
message.cpp
savemanager.cpp

tilemap/collision.cpp
tilemap/pathfinding.cpp
tilemap/tile.cpp
Expand All @@ -115,7 +115,7 @@ set (GAMESTATE_HEADER_FILES
battle/ai/unitaihelper.h
battle/ai/unitailowmorale.h
battle/ai/unitaivanilla.h

battle/battle.h
battle/battledoor.h
battle/battleexplosion.h
Expand All @@ -126,7 +126,7 @@ set (GAMESTATE_HEADER_FILES
battle/battlescanner.h
battle/battleunit.h
battle/battleunitmission.h

city/agentmission.h
city/base.h
city/building.h
Expand All @@ -138,7 +138,7 @@ set (GAMESTATE_HEADER_FILES
city/vehicle.h
city/vehiclemission.h
city/vequipment.h

rules/battle/battlecommonimagelist.h
rules/battle/battlecommonsamplelist.h
rules/battle/battlemap.h
Expand All @@ -148,7 +148,7 @@ set (GAMESTATE_HEADER_FILES
rules/battle/battleunitimagepack.h
rules/battle/battlemaptileset.h
rules/battle/damage.h

rules/city/baselayout.h
rules/city/citycommonimagelist.h
rules/city/citycommonsamplelist.h
Expand All @@ -161,19 +161,19 @@ set (GAMESTATE_HEADER_FILES
rules/city/vammotype.h
rules/city/vehicletype.h
rules/city/vequipmenttype.h

rules/aequipmenttype.h
rules/agenttype.h
rules/doodadtype.h
rules/supportedmappart.h

shared/aequipment.h
shared/agent.h
shared/doodad.h
shared/equipment.h
shared/organisation.h
shared/projectile.h

gameevent.h
gameeventtypes.h
gamestate.h
Expand All @@ -187,7 +187,7 @@ set (GAMESTATE_HEADER_FILES
message.h
savemanager.h
stateobject.h

tilemap/collision.h
tilemap/tile.h
tilemap/tilemap.h
Expand Down Expand Up @@ -232,22 +232,22 @@ add_custom_command(OUTPUT
gamestate_serialize_generated.h
gamestate_serialize_generated.cpp
COMMAND
${CMAKE_BINARY_DIR}/bin/OpenApoc_GamestateSerializeGen
$<TARGET_FILE:OpenApoc_GamestateSerializeGen>
-x ${CMAKE_SOURCE_DIR}/game/state/gamestate_serialize.xml
-h gamestate_serialize_generated.h
-o gamestate_serialize_generated.cpp
DEPENDS
${CMAKE_BINARY_DIR}/bin/OpenApoc_GamestateSerializeGen
OpenApoc_GamestateSerializeGen
${CMAKE_SOURCE_DIR}/game/state/gamestate_serialize.xml)

add_custom_command(OUTPUT
luagamestate_support_generated.h
luagamestate_support_generated.cpp
COMMAND
${CMAKE_BINARY_DIR}/bin/OpenApoc_LuaGamestateSupportGen
$<TARGET_FILE:OpenApoc_LuaGamestateSupportGen>
-x ${CMAKE_SOURCE_DIR}/game/state/gamestate_serialize.xml
-h luagamestate_support_generated.h
-o luagamestate_support_generated.cpp
DEPENDS
${CMAKE_BINARY_DIR}/bin/OpenApoc_LuaGamestateSupportGen
OpenApoc_LuaGamestateSupportGen
${CMAKE_SOURCE_DIR}/game/state/gamestate_serialize.xml)
38 changes: 19 additions & 19 deletions game/ui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ set (GAMEUI_SOURCE_FILES
base/transactionscreen.cpp
base/transferscreen.cpp
base/vequipscreen.cpp

battle/battlebriefing.cpp
battle/battledebriefing.cpp
battle/battleprestart.cpp
battle/battleturnbasedconfirmbox.cpp

city/basebuyscreen.cpp
city/baseselectscreen.cpp
city/bribescreen.cpp
Expand All @@ -32,17 +32,17 @@ set (GAMEUI_SOURCE_FILES
city/infiltrationscreen.cpp
city/basedefensescreen.cpp
city/scorescreen.cpp

components/agentassignment.cpp
components/basegraphics.cpp
components/controlgenerator.cpp
components/equipscreen.cpp
components/locationscreen.cpp

debugtools/debugmenu.cpp
debugtools/formpreview.cpp
debugtools/imagepreview.cpp

general/aequipscreen.cpp
general/aequipmentsheet.cpp
general/agentsheet.cpp
Expand All @@ -58,24 +58,24 @@ set (GAMEUI_SOURCE_FILES
general/messagelogscreen.cpp
general/notificationscreen.cpp
general/vehiclesheet.cpp

skirmish/skirmish.cpp
skirmish/selectforces.cpp
skirmish/mapselector.cpp

tileview/battletileview.cpp
tileview/battleview.cpp
tileview/citytileview.cpp
tileview/cityview.cpp
tileview/tileview.cpp

ufopaedia/ufopaediacategoryview.cpp
ufopaedia/ufopaediaview.cpp

boot.cpp)
source_group(gamestate\\sources FILES ${GAMEUI_SOURCE_FILES})
set (GAMEUI_HEADER_FILES

base/aliencontainmentscreen.h
base/basescreen.h
base/basestage.h
Expand All @@ -86,12 +86,12 @@ set (GAMEUI_HEADER_FILES
base/transactionscreen.h
base/transferscreen.h
base/vequipscreen.h

battle/battlebriefing.h
battle/battledebriefing.h
battle/battleprestart.h
battle/battleturnbasedconfirmbox.h

city/basebuyscreen.h
city/baseselectscreen.h
city/bribescreen.h
Expand All @@ -100,17 +100,17 @@ set (GAMEUI_HEADER_FILES
city/infiltrationscreen.h
city/basedefensescreen.h
city/scorescreen.h

components/agentassignment.h
components/basegraphics.h
components/controlgenerator.h
components/equipscreen.h
components/locationscreen.h

debugtools/debugmenu.h
debugtools/formpreview.h
debugtools/imagepreview.h

general/aequipscreen.h
general/aequipmentsheet.h
general/agentsheet.h
Expand All @@ -126,20 +126,20 @@ set (GAMEUI_HEADER_FILES
general/messagelogscreen.h
general/notificationscreen.h
general/vehiclesheet.h

skirmish/skirmish.h
skirmish/selectforces.h
skirmish/mapselector.h

tileview/battletileview.h
tileview/battleview.h
tileview/citytileview.h
tileview/cityview.h
tileview/tileview.h

ufopaedia/ufopaediacategoryview.h
ufopaedia/ufopaediaview.h

boot.h)
source_group(gamestate\\headers FILES ${GAMEUI_HEADER_FILES})

Expand Down
8 changes: 4 additions & 4 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.1)

set (TEST_LIST test_rect test_voxel test_tilemap test_rng test_images
test_unicode test_colour)

foreach(TEST ${TEST_LIST})
add_executable(${TEST} ${TEST}.cpp)
# Just add all libs?
target_link_libraries(${TEST} OpenApoc_Library OpenApoc_Framework
OpenApoc_GameState)
target_compile_definitions(${TEST} PRIVATE -DUNIT_TEST)
add_test(NAME ${TEST} COMMAND ${EXECUTABLE_OUTPUT_PATH}/${TEST}
add_test(NAME ${TEST} COMMAND ${TEST}
--Framework.CD=${CD_PATH} --Framework.Data=${CMAKE_SOURCE_DIR}/data)
endforeach()

# test_serialize requires args so needs to be slightly separate
# test_serialize requires args so needs to be slightly separate
set(TEST test_serialize)
add_executable(${TEST} ${TEST}.cpp)
# Just add all libs?
target_link_libraries(${TEST} OpenApoc_Library OpenApoc_Framework
OpenApoc_GameState)
target_compile_definitions(${TEST} PRIVATE -DUNIT_TEST)
add_test(NAME ${TEST}_difficulty1 COMMAND ${EXECUTABLE_OUTPUT_PATH}/${TEST}
add_test(NAME ${TEST}_difficulty1 COMMAND ${TEST}
${CMAKE_SOURCE_DIR}/data/difficulty1_patched
${CMAKE_SOURCE_DIR}/data/gamestate_common
--Framework.CD=${CD_PATH} --Framework.Data=${CMAKE_SOURCE_DIR}/data)
Expand Down
4 changes: 2 additions & 2 deletions tools/extractors/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ function (add_extractor TARGET_LIST EXTRACTOR_NAME)
add_custom_command(OUTPUT
${EXTRACTOR_OUTPUT}
COMMAND
${CMAKE_BINARY_DIR}/bin/OpenApoc_DataExtractor
$<TARGET_FILE:OpenApoc_DataExtractor>
--Framework.CD=${CD_PATH}
--Framework.Data=${CMAKE_SOURCE_DIR}/data
--Extractor.extract=${EXTRACTOR_NAME}
DEPENDS OpenApoc_DataExtractor
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
VERBATIM)
set(${TARGET_LIST} ${${TARGET_LIST}} ${EXTRACTOR_OUTPUT} PARENT_SCOPE)
set(${TARGET_LIST} ${${TARGET_LIST}} ${EXTRACTOR_OUTPUT} PARENT_SCOPE)
endfunction(add_extractor)

SET(EXTRACTOR_TARGET_LIST "")
Expand Down

0 comments on commit 5ba1c35

Please sign in to comment.