Skip to content

Commit

Permalink
Appveyor: Check for NO_INSTALL in all of the files.
Browse files Browse the repository at this point in the history
  • Loading branch information
ensiform committed Oct 6, 2015
1 parent 38ba5ee commit 6b3f9e5
Show file tree
Hide file tree
Showing 9 changed files with 189 additions and 167 deletions.
30 changes: 16 additions & 14 deletions code/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -386,22 +386,24 @@ if(BuildSPEngine OR BuildJK2SPEngine)
endif(MakeApplicationBundles)
endif(WIN32)

if(MakeApplicationBundles)
install(TARGETS ${ProjectName}
BUNDLE
DESTINATION ${InstallDir}
COMPONENT ${Component})
else(MakeApplicationBundles)
install(TARGETS ${ProjectName}
RUNTIME
DESTINATION ${InstallDir}
COMPONENT ${Component})
if(SPEngineExtraInstallFiles)
install(FILES ${SPEngineExtraInstallFiles}
if(NOT NO_INSTALL)
if(MakeApplicationBundles)
install(TARGETS ${ProjectName}
BUNDLE
DESTINATION ${InstallDir}
COMPONENT ${Component})
endif()
endif(MakeApplicationBundles)
else(MakeApplicationBundles)
install(TARGETS ${ProjectName}
RUNTIME
DESTINATION ${InstallDir}
COMPONENT ${Component})
if(SPEngineExtraInstallFiles)
install(FILES ${SPEngineExtraInstallFiles}
DESTINATION ${InstallDir}
COMPONENT ${Component})
endif()
endif(MakeApplicationBundles)
endif(NOT NO_INSTALL)

set_target_properties(${ProjectName} PROPERTIES COMPILE_DEFINITIONS "${SPEngineDefines}")

Expand Down
28 changes: 15 additions & 13 deletions code/game/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -368,22 +368,24 @@ if(NOT MSVC)
set_target_properties(${SPGame} PROPERTIES PREFIX "")
endif()

if(WIN32)
install(TARGETS ${SPGame}
RUNTIME
DESTINATION "${JKAInstallDir}/OpenJK"
COMPONENT ${JKASPClientComponent})
else(WIN32)
if(MakeApplicationBundles AND BuildSPEngine)
install(TARGETS ${SPGame}
LIBRARY
DESTINATION "${JKAInstallDir}/${SPEngine}.app/Contents/MacOS/OpenJK"
COMPONENT ${JKASPClientComponent})
else()
if(NOT NO_INSTALL)
if(WIN32)
install(TARGETS ${SPGame}
LIBRARY
RUNTIME
DESTINATION "${JKAInstallDir}/OpenJK"
COMPONENT ${JKASPClientComponent})
else(WIN32)
if(MakeApplicationBundles AND BuildSPEngine)
install(TARGETS ${SPGame}
LIBRARY
DESTINATION "${JKAInstallDir}/${SPEngine}.app/Contents/MacOS/OpenJK"
COMPONENT ${JKASPClientComponent})
else()
install(TARGETS ${SPGame}
LIBRARY
DESTINATION "${JKAInstallDir}/OpenJK"
COMPONENT ${JKASPClientComponent})
endif()
endif()
endif()

Expand Down
28 changes: 15 additions & 13 deletions code/rd-vanilla/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,22 +150,24 @@ if(BuildSPRdVanilla OR BuildJK2SPRdVanilla)
set_target_properties(${ProjectName} PROPERTIES PREFIX "")
endif()

if(WIN32)
install(TARGETS ${ProjectName}
RUNTIME
DESTINATION ${InstallDir}
COMPONENT ${Component})
else(WIN32)
if(MakeApplicationBundles AND (BuildSPEngine OR BuildJK2SPEngine))
if(NOT NO_INSTALL)
if(WIN32)
install(TARGETS ${ProjectName}
LIBRARY
DESTINATION "${InstallDir}/${EngineName}.app/Contents/MacOS/"
COMPONENT ${Component})
else()
install(TARGETS ${ProjectName}
LIBRARY
RUNTIME
DESTINATION ${InstallDir}
COMPONENT ${Component})
else(WIN32)
if(MakeApplicationBundles AND (BuildSPEngine OR BuildJK2SPEngine))
install(TARGETS ${ProjectName}
LIBRARY
DESTINATION "${InstallDir}/${EngineName}.app/Contents/MacOS/"
COMPONENT ${Component})
else()
install(TARGETS ${ProjectName}
LIBRARY
DESTINATION ${InstallDir}
COMPONENT ${Component})
endif()
endif()
endif()

Expand Down
20 changes: 11 additions & 9 deletions codeJK2/game/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -273,15 +273,17 @@ if(NOT MSVC)
set_target_properties(${JK2SPGame} PROPERTIES PREFIX "")
endif()

if(WIN32)
install(TARGETS ${JK2SPGame} RUNTIME DESTINATION "${JK2InstallDir}/OpenJK")
else(WIN32)
if(MakeApplicationBundles AND BuildJK2SPEngine)
install(TARGETS ${JK2SPGame} LIBRARY DESTINATION "${JK2InstallDir}/${JK2SPEngine}.app/Contents/MacOS/OpenJK")
else(MakeApplicationBundles AND BuildJK2SPEngine)
install(TARGETS ${JK2SPGame} LIBRARY DESTINATION "${JK2InstallDir}/OpenJK")
endif(MakeApplicationBundles AND BuildJK2SPEngine)
endif(WIN32)
if(NOT NO_INSTALL)
if(WIN32)
install(TARGETS ${JK2SPGame} RUNTIME DESTINATION "${JK2InstallDir}/OpenJK")
else(WIN32)
if(MakeApplicationBundles AND BuildJK2SPEngine)
install(TARGETS ${JK2SPGame} LIBRARY DESTINATION "${JK2InstallDir}/${JK2SPEngine}.app/Contents/MacOS/OpenJK")
else(MakeApplicationBundles AND BuildJK2SPEngine)
install(TARGETS ${JK2SPGame} LIBRARY DESTINATION "${JK2InstallDir}/OpenJK")
endif(MakeApplicationBundles AND BuildJK2SPEngine)
endif(WIN32)
#endif()

set_target_properties(${JK2SPGame} PROPERTIES COMPILE_DEFINITIONS "${JK2SPGameDefines}")

Expand Down
112 changes: 59 additions & 53 deletions codemp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -557,22 +557,24 @@ if(BuildMPEngine)
endif(MakeApplicationBundles)
endif(WIN32)

if(MakeApplicationBundles)
install(TARGETS ${MPEngine}
BUNDLE
DESTINATION ${JKAInstallDir}
COMPONENT ${JKAMPClientComponent})
else(MakeApplicationBundles)
install(TARGETS ${MPEngine}
RUNTIME
DESTINATION ${JKAInstallDir}
COMPONENT ${JKAMPClientComponent})
if(MPEngineExtraInstallFiles)
install(FILES ${MPEngineExtraInstallFiles}
if(NOT NO_INSTALL)
if(MakeApplicationBundles)
install(TARGETS ${MPEngine}
BUNDLE
DESTINATION ${JKAInstallDir}
COMPONENT ${JKAMPClientComponent})
endif()
endif(MakeApplicationBundles)
else(MakeApplicationBundles)
install(TARGETS ${MPEngine}
RUNTIME
DESTINATION ${JKAInstallDir}
COMPONENT ${JKAMPClientComponent})
if(MPEngineExtraInstallFiles)
install(FILES ${MPEngineExtraInstallFiles}
DESTINATION ${JKAInstallDir}
COMPONENT ${JKAMPClientComponent})
endif()
endif(MakeApplicationBundles)
endif()

set_target_properties(${MPEngine} PROPERTIES COMPILE_DEFINITIONS "${MPEngineDefines}")

Expand Down Expand Up @@ -661,10 +663,12 @@ if(BuildMPDed)
endif(WIN32)

add_executable(${MPDed} ${MPDedFiles})
install(TARGETS ${MPDed}
RUNTIME
DESTINATION ${JKAInstallDir}
COMPONENT ${JKAMPServerComponent})
if(NOT NO_INSTALL)
install(TARGETS ${MPDed}
RUNTIME
DESTINATION ${JKAInstallDir}
COMPONENT ${JKAMPServerComponent})
endif()

set_target_properties(${MPDed} PROPERTIES COMPILE_DEFINITIONS "${MPDedDefines}")

Expand All @@ -676,43 +680,45 @@ if(BuildMPDed)
target_link_libraries(${MPDed} ${MPDedLibraries})
endif(BuildMPDed)

set(GameLibsBuilt)
if(BuildMPGame)
set(GameLibsBuilt ${GameLibsBuilt} ${MPGame})
endif()

if(BuildMPCGame)
set(GameLibsBuilt ${GameLibsBuilt} ${MPCGame})
endif()
if(NOT NO_INSTALL)
set(GameLibsBuilt)
if(BuildMPGame)
set(GameLibsBuilt ${GameLibsBuilt} ${MPGame})
endif()

if(BuildMPUI)
set(GameLibsBuilt ${GameLibsBuilt} ${MPUI})
endif()
if(BuildMPCGame)
set(GameLibsBuilt ${GameLibsBuilt} ${MPCGame})
endif()

if(WIN32)
set(GameLibFullPaths)
if(MSVC)
foreach(GameLib ${GameLibsBuilt})
set(GameLibFullPaths
${GameLibFullPaths}
${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${GameLib}${CMAKE_SHARED_LIBRARY_SUFFIX})
endforeach(GameLib)
else()
foreach(GameLib ${GameLibsBuilt})
set(GameLibFullPaths
${GameLibFullPaths}
${CMAKE_BINARY_DIR}/${GameLib}${CMAKE_SHARED_LIBRARY_SUFFIX})
endforeach(GameLib)
if(BuildMPUI)
set(GameLibsBuilt ${GameLibsBuilt} ${MPUI})
endif()

include(InstallZIP)
add_zip_command(${AssetsPk3}
FILES ${GameLibFullPaths}
DEPENDS "${GameLibsBuilt}")
add_custom_target(Assets
ALL
DEPENDS ${AssetsPk3})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${AssetsPk3}
DESTINATION "${JKAInstallDir}/OpenJK"
COMPONENT ${JKAMPCoreComponent})
if(WIN32)
set(GameLibFullPaths)
if(MSVC)
foreach(GameLib ${GameLibsBuilt})
set(GameLibFullPaths
${GameLibFullPaths}
${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${GameLib}${CMAKE_SHARED_LIBRARY_SUFFIX})
endforeach(GameLib)
else()
foreach(GameLib ${GameLibsBuilt})
set(GameLibFullPaths
${GameLibFullPaths}
${CMAKE_BINARY_DIR}/${GameLib}${CMAKE_SHARED_LIBRARY_SUFFIX})
endforeach(GameLib)
endif()

include(InstallZIP)
add_zip_command(${AssetsPk3}
FILES ${GameLibFullPaths}
DEPENDS "${GameLibsBuilt}")
add_custom_target(Assets
ALL
DEPENDS ${AssetsPk3})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${AssetsPk3}
DESTINATION "${JKAInstallDir}/OpenJK"
COMPONENT ${JKAMPCoreComponent})
endif()
endif()
54 changes: 28 additions & 26 deletions codemp/cgame/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,37 +136,39 @@ if(NOT MSVC)
set_target_properties(${MPCGame} PROPERTIES PREFIX "")
endif()

if(MakeApplicationBundles AND BuildMPEngine)
install(TARGETS ${MPCGame}
LIBRARY
DESTINATION "${JKAInstallDir}/${MPEngine}.app/Contents/MacOS/OpenJK"
COMPONENT ${JKAMPCoreComponent})
install(TARGETS ${MPCGame}
LIBRARY
DESTINATION "${JKAInstallDir}/${MPEngine}.app/Contents/MacOS/base"
COMPONENT ${JKAMPCoreComponent})
elseif(WIN32)
install(TARGETS ${MPCGame}
RUNTIME
DESTINATION "${JKAInstallDir}/OpenJK"
COMPONENT ${JKAMPCoreComponent})
if (WIN64)
# Don't do this on 32-bit Windows to avoid overwriting
# vanilla JKA's DLLs
if(NOT NO_INSTALL)
if(MakeApplicationBundles AND BuildMPEngine)
install(TARGETS ${MPCGame}
LIBRARY
DESTINATION "${JKAInstallDir}/${MPEngine}.app/Contents/MacOS/OpenJK"
COMPONENT ${JKAMPCoreComponent})
install(TARGETS ${MPCGame}
LIBRARY
DESTINATION "${JKAInstallDir}/${MPEngine}.app/Contents/MacOS/base"
COMPONENT ${JKAMPCoreComponent})
elseif(WIN32)
install(TARGETS ${MPCGame}
RUNTIME
DESTINATION "${JKAInstallDir}/OpenJK"
COMPONENT ${JKAMPCoreComponent})
if (WIN64)
# Don't do this on 32-bit Windows to avoid overwriting
# vanilla JKA's DLLs
install(TARGETS ${MPCGame}
RUNTIME
DESTINATION "${JKAInstallDir}/base"
COMPONENT ${JKAMPCoreComponent})
endif()
else()
install(TARGETS ${MPCGame}
LIBRARY
DESTINATION "${JKAInstallDir}/OpenJK"
COMPONENT ${JKAMPCoreComponent})
install(TARGETS ${MPCGame}
LIBRARY
DESTINATION "${JKAInstallDir}/base"
COMPONENT ${JKAMPCoreComponent})
endif()
else()
install(TARGETS ${MPCGame}
LIBRARY
DESTINATION "${JKAInstallDir}/OpenJK"
COMPONENT ${JKAMPCoreComponent})
install(TARGETS ${MPCGame}
LIBRARY
DESTINATION "${JKAInstallDir}/base"
COMPONENT ${JKAMPCoreComponent})
endif()

set_target_properties(${MPCGame} PROPERTIES COMPILE_DEFINITIONS "${MPCGameDefines}")
Expand Down
2 changes: 2 additions & 0 deletions codemp/game/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ if(NOT MSVC)
set_target_properties(${MPGame} PROPERTIES PREFIX "")
endif()

if(NOT NO_INSTALL)
if(MakeApplicationBundles AND BuildMPEngine)
install(TARGETS ${MPGame}
LIBRARY
Expand Down Expand Up @@ -236,6 +237,7 @@ else()
DESTINATION "${JKAInstallDir}/base"
COMPONENT ${JKAMPCoreComponent})
endif()
endif()

set_target_properties(${MPGame} PROPERTIES COMPILE_DEFINITIONS "${MPGameDefines}")

Expand Down
28 changes: 15 additions & 13 deletions codemp/rd-vanilla/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,22 +131,24 @@ if(NOT MSVC)
set_target_properties(${MPVanillaRenderer} PROPERTIES PREFIX "")
endif()

if(WIN32)
install(TARGETS ${MPVanillaRenderer}
RUNTIME
DESTINATION ${JKAInstallDir}
COMPONENT ${JKAMPClientComponent})
else(WIN32)
if(MakeApplicationBundles AND BuildMPEngine)
if(NOT NO_INSTALL)
if(WIN32)
install(TARGETS ${MPVanillaRenderer}
LIBRARY
DESTINATION "${JKAInstallDir}/${MPEngine}.app/Contents/MacOS/"
COMPONENT ${JKAMPClientComponent})
else()
install(TARGETS ${MPVanillaRenderer}
LIBRARY
RUNTIME
DESTINATION ${JKAInstallDir}
COMPONENT ${JKAMPClientComponent})
else(WIN32)
if(MakeApplicationBundles AND BuildMPEngine)
install(TARGETS ${MPVanillaRenderer}
LIBRARY
DESTINATION "${JKAInstallDir}/${MPEngine}.app/Contents/MacOS/"
COMPONENT ${JKAMPClientComponent})
else()
install(TARGETS ${MPVanillaRenderer}
LIBRARY
DESTINATION ${JKAInstallDir}
COMPONENT ${JKAMPClientComponent})
endif()
endif()
endif()

Expand Down
Loading

0 comments on commit 6b3f9e5

Please sign in to comment.