From c6067c97b7755205aa940b06eea69f0e03d5d178 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 10 Jul 2010 13:40:38 +0200 Subject: [PATCH] Changed: #880 Use PCH under Linux with CMake --- .../tools/3d/plugin_max/nel_3dsmax_shared/CMakeLists.txt | 4 ++++ code/nel/tools/3d/plugin_max/nel_mesh_lib/CMakeLists.txt | 4 ++++ .../nel/tools/3d/plugin_max/nel_patch_edit/CMakeLists.txt | 4 ++++ code/nel/tools/logic/logic_editor_dll/CMakeLists.txt | 4 +++- code/nel/tools/logic/logic_editor_exe/CMakeLists.txt | 4 +++- code/ryzom/server/src/ai_service/CMakeLists.txt | 5 +++++ code/ryzom/server/src/ai_share/CMakeLists.txt | 4 ++++ code/ryzom/server/src/frontend_service/CMakeLists.txt | 8 +++++--- code/ryzom/server/src/input_output_service/CMakeLists.txt | 5 +++++ code/ryzom/server/src/mail_forum_service/CMakeLists.txt | 4 ++++ code/ryzom/server/src/monitor_service/CMakeLists.txt | 5 +++++ code/ryzom/server/src/server_share/CMakeLists.txt | 4 ++++ .../ryzom/server/src/shard_unifier_service/CMakeLists.txt | 4 ++++ code/ryzom/tools/sheet_random_generator/CMakeLists.txt | 4 ++++ .../sheet_random_generator/sheet_random_generator.cpp | 2 +- code/ryzom/tools/sheets_packer/CMakeLists.txt | 4 ++++ 16 files changed, 63 insertions(+), 6 deletions(-) diff --git a/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/CMakeLists.txt b/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/CMakeLists.txt index a20977bd2..27359b29d 100644 --- a/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/CMakeLists.txt +++ b/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/CMakeLists.txt @@ -22,4 +22,8 @@ SET_TARGET_PROPERTIES(nel_3dsmax_shared PROPERTIES ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DNEL_3DSMAX_SHARED_EXPORTS) +IF(WITH_PCH) + ADD_NATIVE_PRECOMPILED_HEADER(nel_3dsmax_shared ${CMAKE_CURRENT_SOURCE_DIR}/StdAfx.h ${CMAKE_CURRENT_SOURCE_DIR}/StdAfx.cpp) +ENDIF(WITH_PCH) + INSTALL(TARGETS nel_3dsmax_shared RUNTIME DESTINATION maxplugin/plugins LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/CMakeLists.txt b/code/nel/tools/3d/plugin_max/nel_mesh_lib/CMakeLists.txt index 7ed6460ab..3e55c015a 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/CMakeLists.txt +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/CMakeLists.txt @@ -15,4 +15,8 @@ SET_TARGET_PROPERTIES(nel_mesh_lib PROPERTIES ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) +IF(WITH_PCH) + ADD_NATIVE_PRECOMPILED_HEADER(nel_mesh_lib ${CMAKE_CURRENT_SOURCE_DIR}/StdAfx.h ${CMAKE_CURRENT_SOURCE_DIR}/StdAfx.cpp) +ENDIF(WITH_PCH) + INSTALL(TARGETS nel_mesh_lib RUNTIME DESTINATION maxplugin/plugins LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) diff --git a/code/nel/tools/3d/plugin_max/nel_patch_edit/CMakeLists.txt b/code/nel/tools/3d/plugin_max/nel_patch_edit/CMakeLists.txt index 61049347e..b99689017 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_edit/CMakeLists.txt +++ b/code/nel/tools/3d/plugin_max/nel_patch_edit/CMakeLists.txt @@ -25,4 +25,8 @@ SET_TARGET_PROPERTIES(nel_patch_edit PROPERTIES ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) +IF(WITH_PCH) + ADD_NATIVE_PRECOMPILED_HEADER(nel_patch_edit ${CMAKE_CURRENT_SOURCE_DIR}/stdafx.h ${CMAKE_CURRENT_SOURCE_DIR}/stdafx.cpp) +ENDIF(WITH_PCH) + INSTALL(TARGETS nel_patch_edit RUNTIME DESTINATION maxplugin/plugins LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) diff --git a/code/nel/tools/logic/logic_editor_dll/CMakeLists.txt b/code/nel/tools/logic/logic_editor_dll/CMakeLists.txt index 30fb836ac..5a89f28b2 100644 --- a/code/nel/tools/logic/logic_editor_dll/CMakeLists.txt +++ b/code/nel/tools/logic/logic_editor_dll/CMakeLists.txt @@ -24,6 +24,8 @@ ENDIF(WIN32) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) -ADD_NATIVE_PRECOMPILED_HEADER(logic_editor_dll ${CMAKE_CURRENT_SOURCE_DIR}/StdAfx.h ${CMAKE_CURRENT_SOURCE_DIR}/StdAfx.cpp) +IF(WITH_PCH) + ADD_NATIVE_PRECOMPILED_HEADER(logic_editor_dll ${CMAKE_CURRENT_SOURCE_DIR}/StdAfx.h ${CMAKE_CURRENT_SOURCE_DIR}/StdAfx.cpp) +ENDIF(WITH_PCH) INSTALL(TARGETS logic_editor_dll LIBRARY DESTINATION lib RUNTIME DESTINATION bin ARCHIVE DESTINATION lib COMPONENT toolsmisc) diff --git a/code/nel/tools/logic/logic_editor_exe/CMakeLists.txt b/code/nel/tools/logic/logic_editor_exe/CMakeLists.txt index dd4b4c8c6..5f2a4779b 100644 --- a/code/nel/tools/logic/logic_editor_exe/CMakeLists.txt +++ b/code/nel/tools/logic/logic_editor_exe/CMakeLists.txt @@ -13,6 +13,8 @@ IF(WIN32) PROJECT_LABEL "Tools, Logic: Logic Editor") ENDIF(WIN32) -ADD_NATIVE_PRECOMPILED_HEADER(logic_editor ${CMAKE_CURRENT_SOURCE_DIR}/StdAfx.h ${CMAKE_CURRENT_SOURCE_DIR}/StdAfx.cpp) +IF(WITH_PCH) + ADD_NATIVE_PRECOMPILED_HEADER(logic_editor ${CMAKE_CURRENT_SOURCE_DIR}/StdAfx.h ${CMAKE_CURRENT_SOURCE_DIR}/StdAfx.cpp) +ENDIF(WITH_PCH) INSTALL(TARGETS logic_editor RUNTIME DESTINATION bin COMPONENT toolsmisc) diff --git a/code/ryzom/server/src/ai_service/CMakeLists.txt b/code/ryzom/server/src/ai_service/CMakeLists.txt index 40fedc860..f8b05c7b3 100644 --- a/code/ryzom/server/src/ai_service/CMakeLists.txt +++ b/code/ryzom/server/src/ai_service/CMakeLists.txt @@ -35,7 +35,12 @@ IF(WIN32) LINK_FLAGS "/NODEFAULTLIB:libcmt /SUBSYSTEM:WINDOWS" PROJECT_LABEL "Services: AI Service (AIS)") ENDIF(WIN32) + ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) +IF(WITH_PCH) + ADD_NATIVE_PRECOMPILED_HEADER(ai_service ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp) +ENDIF(WITH_PCH) + INSTALL(TARGETS ai_service RUNTIME DESTINATION sbin COMPONENT services) diff --git a/code/ryzom/server/src/ai_share/CMakeLists.txt b/code/ryzom/server/src/ai_share/CMakeLists.txt index 99d15cef4..e9b043a07 100644 --- a/code/ryzom/server/src/ai_share/CMakeLists.txt +++ b/code/ryzom/server/src/ai_share/CMakeLists.txt @@ -22,4 +22,8 @@ ENDIF(WIN32) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) +IF(WITH_PCH) + ADD_NATIVE_PRECOMPILED_HEADER(ai_share ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp) +ENDIF(WITH_PCH) + INSTALL(TARGETS ai_share LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) diff --git a/code/ryzom/server/src/frontend_service/CMakeLists.txt b/code/ryzom/server/src/frontend_service/CMakeLists.txt index 94073d7c0..5fa67758e 100644 --- a/code/ryzom/server/src/frontend_service/CMakeLists.txt +++ b/code/ryzom/server/src/frontend_service/CMakeLists.txt @@ -9,9 +9,6 @@ LIST(REMOVE_ITEM SRC ${CMAKE_CURRENT_SOURCE_DIR}/pair_selector.cpp ADD_EXECUTABLE(frontend_service ${SRC}) - - - INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${MYSQL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ${NEL_INCLUDE_DIR}) TARGET_LINK_LIBRARIES(frontend_service admin_modules ryzom_gameshare ${PLATFORM_LINKFLAGS} ${LIBXML2_LIBRARIES} ${MYSQL_LIBRARIES} ${ZLIB_LIBRARIES} ${NELMISC_LIBRARY} ${NELNET_LIBRARY} ${NELGEORGES_LIBRARY} ${NELLIGO_LIBRARY}) IF(WIN32) @@ -19,7 +16,12 @@ IF(WIN32) LINK_FLAGS "/NODEFAULTLIB:libcmt /SUBSYSTEM:WINDOWS" PROJECT_LABEL "Services: Frontend Service (FS)") ENDIF(WIN32) + ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) +IF(WITH_PCH) + ADD_NATIVE_PRECOMPILED_HEADER(frontend_service ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp) +ENDIF(WITH_PCH) + INSTALL(TARGETS frontend_service RUNTIME DESTINATION sbin COMPONENT services) diff --git a/code/ryzom/server/src/input_output_service/CMakeLists.txt b/code/ryzom/server/src/input_output_service/CMakeLists.txt index 142cf8205..b04f16562 100644 --- a/code/ryzom/server/src/input_output_service/CMakeLists.txt +++ b/code/ryzom/server/src/input_output_service/CMakeLists.txt @@ -28,8 +28,13 @@ IF(WIN32) LINK_FLAGS "/NODEFAULTLIB:libcmt /SUBSYSTEM:WINDOWS" PROJECT_LABEL "Services: Input Ouput Service (IOS)") ENDIF(WIN32) + ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) +IF(WITH_PCH) + ADD_NATIVE_PRECOMPILED_HEADER(ios_service ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp) +ENDIF(WITH_PCH) + INSTALL(TARGETS ios_service RUNTIME DESTINATION sbin COMPONENT services) diff --git a/code/ryzom/server/src/mail_forum_service/CMakeLists.txt b/code/ryzom/server/src/mail_forum_service/CMakeLists.txt index 1d402104e..5cbafe41b 100644 --- a/code/ryzom/server/src/mail_forum_service/CMakeLists.txt +++ b/code/ryzom/server/src/mail_forum_service/CMakeLists.txt @@ -17,6 +17,10 @@ IF(WIN32) ENDIF(WIN32) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) +IF(WITH_PCH) + ADD_NATIVE_PRECOMPILED_HEADER(mail_forum_service ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp) +ENDIF(WITH_PCH) + INSTALL(TARGETS mail_forum_service RUNTIME DESTINATION sbin COMPONENT services) diff --git a/code/ryzom/server/src/monitor_service/CMakeLists.txt b/code/ryzom/server/src/monitor_service/CMakeLists.txt index ba68d184e..fa77c7d42 100644 --- a/code/ryzom/server/src/monitor_service/CMakeLists.txt +++ b/code/ryzom/server/src/monitor_service/CMakeLists.txt @@ -16,8 +16,13 @@ IF(WIN32) LINK_FLAGS "/NODEFAULTLIB:libcmt /SUBSYSTEM:WINDOWS" PROJECT_LABEL "Services: Monitor Service (MOS)") ENDIF(WIN32) + ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) +IF(WITH_PCH) + ADD_NATIVE_PRECOMPILED_HEADER(monitor_service ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp) +ENDIF(WITH_PCH) + INSTALL(TARGETS monitor_service RUNTIME DESTINATION sbin COMPONENT services) diff --git a/code/ryzom/server/src/server_share/CMakeLists.txt b/code/ryzom/server/src/server_share/CMakeLists.txt index d4535389f..b5009204d 100644 --- a/code/ryzom/server/src/server_share/CMakeLists.txt +++ b/code/ryzom/server/src/server_share/CMakeLists.txt @@ -22,4 +22,8 @@ ENDIF(WIN32) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) +IF(WITH_PCH) + ADD_NATIVE_PRECOMPILED_HEADER(server_share ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp) +ENDIF(WITH_PCH) + INSTALL(TARGETS server_share LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) diff --git a/code/ryzom/server/src/shard_unifier_service/CMakeLists.txt b/code/ryzom/server/src/shard_unifier_service/CMakeLists.txt index 6efd5bdc8..ec0862d48 100644 --- a/code/ryzom/server/src/shard_unifier_service/CMakeLists.txt +++ b/code/ryzom/server/src/shard_unifier_service/CMakeLists.txt @@ -20,6 +20,10 @@ IF(WIN32) ENDIF(WIN32) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) +IF(WITH_PCH) + ADD_NATIVE_PRECOMPILED_HEADER(shard_unifier_service ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp) +ENDIF(WITH_PCH) + INSTALL(TARGETS shard_unifier_service RUNTIME DESTINATION sbin COMPONENT services) diff --git a/code/ryzom/tools/sheet_random_generator/CMakeLists.txt b/code/ryzom/tools/sheet_random_generator/CMakeLists.txt index c4045b593..836b9223c 100644 --- a/code/ryzom/tools/sheet_random_generator/CMakeLists.txt +++ b/code/ryzom/tools/sheet_random_generator/CMakeLists.txt @@ -6,4 +6,8 @@ INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${NELMISC_INCLUDE_DIRS} ${NELGEORGES_ TARGET_LINK_LIBRARIES(sheet_random_generator ${PLATFORM_LINKFLAGS} ${LIBXML2_LIBRARIES} ${NELMISC_LIBRARY} ${NELGEORGES_LIBRARY}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) +IF(WITH_PCH) + ADD_NATIVE_PRECOMPILED_HEADER(sheet_random_generator ${CMAKE_CURRENT_SOURCE_DIR}/StdAfx.h ${CMAKE_CURRENT_SOURCE_DIR}/StdAfx.cpp) +ENDIF(WITH_PCH) + INSTALL(TARGETS sheet_random_generator RUNTIME DESTINATION bin COMPONENT tools) diff --git a/code/ryzom/tools/sheet_random_generator/sheet_random_generator.cpp b/code/ryzom/tools/sheet_random_generator/sheet_random_generator.cpp index ea647e1f6..a3d56f40d 100644 --- a/code/ryzom/tools/sheet_random_generator/sheet_random_generator.cpp +++ b/code/ryzom/tools/sheet_random_generator/sheet_random_generator.cpp @@ -16,7 +16,7 @@ -#include "stdafx.h" +#include "StdAfx.h" #include "srg_utilities.h" #include "game_share/protection_type.h" #include "nel/misc/string_conversion.h" diff --git a/code/ryzom/tools/sheets_packer/CMakeLists.txt b/code/ryzom/tools/sheets_packer/CMakeLists.txt index fc14987ce..abc3189da 100644 --- a/code/ryzom/tools/sheets_packer/CMakeLists.txt +++ b/code/ryzom/tools/sheets_packer/CMakeLists.txt @@ -19,4 +19,8 @@ TARGET_LINK_LIBRARIES(sheets_packer ryzom_clientsheets ${LIBXML2_LIBRARIES} ) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) +IF(WITH_PCH) + ADD_NATIVE_PRECOMPILED_HEADER(sheets_packer ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp) +ENDIF(WITH_PCH) + INSTALL(TARGETS sheets_packer RUNTIME DESTINATION bin COMPONENT tools)