diff --git a/code/ryzom/common/src/game_share/CMakeLists.txt b/code/ryzom/common/src/game_share/CMakeLists.txt
index af19bcebe..61292431c 100644
--- a/code/ryzom/common/src/game_share/CMakeLists.txt
+++ b/code/ryzom/common/src/game_share/CMakeLists.txt
@@ -26,7 +26,7 @@ SOURCE_GROUP("R2" FILES ${R2})
 LIST(REMOVE_ITEM SRC ${CMAKE_CURRENT_SOURCE_DIR}/enum_template.cpp)
 LIST(REMOVE_ITEM PRIV_H ${CMAKE_CURRENT_SOURCE_DIR}/enum_template.h)
 
-NL_TARGET_LIB(ryzom_gameshare ${PRIV_H} ${SRC})
+NL_TARGET_LIB(ryzom_gameshare ${PRIV_H} ${SRC} ${R2})
 
 INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${NEL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
 
diff --git a/code/ryzom/server/src/server_share/CMakeLists.txt b/code/ryzom/server/src/server_share/CMakeLists.txt
index 236772f1d..4cee34cc5 100644
--- a/code/ryzom/server/src/server_share/CMakeLists.txt
+++ b/code/ryzom/server/src/server_share/CMakeLists.txt
@@ -8,7 +8,7 @@ LIST(REMOVE_ITEM SRC R2)
 SOURCE_GROUP("" FILES ${SRC})
 SOURCE_GROUP("R2" FILES ${R2})
 
-NL_TARGET_LIB(ryzom_servershare ${SRC})
+NL_TARGET_LIB(ryzom_servershare ${SRC} ${R2}))
 
 INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${MYSQL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR})