diff --git a/nel/samples/3d/cegui/CMakeLists.txt b/nel/samples/3d/cegui/CMakeLists.txt index 3a8650a19..99acbea00 100644 --- a/nel/samples/3d/cegui/CMakeLists.txt +++ b/nel/samples/3d/cegui/CMakeLists.txt @@ -2,7 +2,7 @@ FILE(GLOB SRC *.cpp *.h) ADD_EXECUTABLE(nl_sample_cegui WIN32 ${SRC}) -ADD_DEFINITIONS(-DCEGUI_DATA_DIR="\\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_cegui/datafiles/\\"") +TARGET_COMPILE_DEFINITIONS(nl_sample_cegui PRIVATE "CEGUI_DATA_DIR=\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_cegui/datafiles/\"") INCLUDE_DIRECTORIES(${CEGUI_INCLUDE_DIRS}) diff --git a/nel/samples/3d/cluster_viewer/CMakeLists.txt b/nel/samples/3d/cluster_viewer/CMakeLists.txt index ad8bdb98d..50a6ddd2d 100644 --- a/nel/samples/3d/cluster_viewer/CMakeLists.txt +++ b/nel/samples/3d/cluster_viewer/CMakeLists.txt @@ -2,7 +2,7 @@ FILE(GLOB SRC *.cpp) ADD_EXECUTABLE(nl_sample_clusterview WIN32 ${SRC}) -ADD_DEFINITIONS(-DCV_DIR="\\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_clusterview/\\"") +TARGET_COMPILE_DEFINITIONS(nl_sample_clusterview PRIVATE "CV_DIR=\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_clusterview/\"") TARGET_LINK_LIBRARIES(nl_sample_clusterview nelmisc nel3d) NL_ADD_RUNTIME_FLAGS(nl_sample_clusterview) diff --git a/nel/samples/3d/font/CMakeLists.txt b/nel/samples/3d/font/CMakeLists.txt index a944ef643..29bab2fe5 100644 --- a/nel/samples/3d/font/CMakeLists.txt +++ b/nel/samples/3d/font/CMakeLists.txt @@ -2,7 +2,7 @@ FILE(GLOB SRC *.cpp) ADD_EXECUTABLE(nl_sample_font WIN32 ${SRC}) -ADD_DEFINITIONS(-DFONT_DIR="\\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_font/\\"") +TARGET_COMPILE_DEFINITIONS(nl_sample_font PRIVATE "FONT_DIR=\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_font/\"") TARGET_LINK_LIBRARIES(nl_sample_font nelmisc nel3d) NL_DEFAULT_PROPS(nl_sample_font "NeL, Samples, 3D: Font") diff --git a/nel/samples/3d/font_perf/CMakeLists.txt b/nel/samples/3d/font_perf/CMakeLists.txt index 2f794c983..0ece408bb 100644 --- a/nel/samples/3d/font_perf/CMakeLists.txt +++ b/nel/samples/3d/font_perf/CMakeLists.txt @@ -2,7 +2,7 @@ FILE(GLOB SRC *.cpp) ADD_EXECUTABLE(nl_sample_font_perf ${SRC}) -ADD_DEFINITIONS(-DFONT_DIR="\\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_font_perf/\\"") +TARGET_COMPILE_DEFINITIONS(nl_sample_font_perf PRIVATE "FONT_DIR=\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_font_perf/\"") TARGET_LINK_LIBRARIES(nl_sample_font_perf nelmisc nel3d) NL_DEFAULT_PROPS(nl_sample_font_perf "NeL, Samples, 3D: Font Performance Test") diff --git a/nel/samples/georges/CMakeLists.txt b/nel/samples/georges/CMakeLists.txt index ed83e9ce3..44388bde5 100644 --- a/nel/samples/georges/CMakeLists.txt +++ b/nel/samples/georges/CMakeLists.txt @@ -2,7 +2,7 @@ FILE(GLOB SRC *.cpp) ADD_EXECUTABLE(nl_sample_georges ${SRC}) -ADD_DEFINITIONS(-DGF_DIR="\\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_georges/\\"") +TARGET_COMPILE_DEFINITIONS(nl_sample_georges PRIVATE "GF_DIR=\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_georges/\"") TARGET_LINK_LIBRARIES(nl_sample_georges nelgeorges nelmisc) NL_DEFAULT_PROPS(nl_sample_georges "NeL, Samples: Georges") diff --git a/nel/samples/misc/configfile/CMakeLists.txt b/nel/samples/misc/configfile/CMakeLists.txt index 3d29c082c..f7afdf3c5 100644 --- a/nel/samples/misc/configfile/CMakeLists.txt +++ b/nel/samples/misc/configfile/CMakeLists.txt @@ -2,7 +2,7 @@ FILE(GLOB SRC *.cpp) ADD_EXECUTABLE(nl_sample_configfile ${SRC}) -ADD_DEFINITIONS(-DNL_SAMPLE_CFG="\\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_configfile/\\"") +TARGET_COMPILE_DEFINITIONS(nl_sample_configfile PRIVATE "NL_SAMPLE_CFG=\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_configfile/\"") TARGET_LINK_LIBRARIES(nl_sample_configfile nelmisc) NL_DEFAULT_PROPS(nl_sample_configfile "NeL, Samples, Misc: Config Files") diff --git a/nel/samples/misc/i18n/CMakeLists.txt b/nel/samples/misc/i18n/CMakeLists.txt index 5238b6180..02535d485 100644 --- a/nel/samples/misc/i18n/CMakeLists.txt +++ b/nel/samples/misc/i18n/CMakeLists.txt @@ -2,7 +2,7 @@ FILE(GLOB SRC *.cpp) ADD_EXECUTABLE(nl_sample_i18n ${SRC}) -ADD_DEFINITIONS(-DNL_LANG_DATA="\\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_i18n/\\"") +TARGET_COMPILE_DEFINITIONS(nl_sample_i18n PRIVATE "NL_LANG_DATA=\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_i18n/\"") TARGET_LINK_LIBRARIES(nl_sample_i18n nelmisc) NL_DEFAULT_PROPS(nl_sample_i18n "NeL, Samples, Misc: I18N") diff --git a/nel/samples/net/chat/CMakeLists.txt b/nel/samples/net/chat/CMakeLists.txt index b5c66d67c..9469345dc 100644 --- a/nel/samples/net/chat/CMakeLists.txt +++ b/nel/samples/net/chat/CMakeLists.txt @@ -2,7 +2,9 @@ ADD_EXECUTABLE(nl_sample_chatclient client.cpp kbhit.cpp kbhit.h) ADD_EXECUTABLE(nl_sample_chatserver WIN32 server.cpp) -ADD_DEFINITIONS(-DCHAT_DIR="\\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_chat/\\"") +SET(CHAT_DIR "CHAT_DIR=\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_chat/\"") +TARGET_COMPILE_DEFINITIONS(nl_sample_chatclient PRIVATE ${CHAT_DIR}) +TARGET_COMPILE_DEFINITIONS(nl_sample_chatserver PRIVATE ${CHAT_DIR}) TARGET_LINK_LIBRARIES(nl_sample_chatclient nelmisc nelnet) NL_DEFAULT_PROPS(nl_sample_chatclient "NeL, Samples, Net, Chat: Chat Client") diff --git a/nel/samples/net/class_transport/CMakeLists.txt b/nel/samples/net/class_transport/CMakeLists.txt index 3561221d4..1c5ac6676 100644 --- a/nel/samples/net/class_transport/CMakeLists.txt +++ b/nel/samples/net/class_transport/CMakeLists.txt @@ -2,7 +2,9 @@ ADD_EXECUTABLE(nl_sample_ct_ai_service WIN32 ai_service.cpp) ADD_EXECUTABLE(nl_sample_ct_gd_service WIN32 gd_service.cpp) -ADD_DEFINITIONS(-DNL_CT_CFG="\\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_class_transport/\\"") +SET(NL_CT_CFG "NL_CT_CFG=\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_class_transport/\"") +TARGET_COMPILE_DEFINITIONS(nl_sample_ct_ai_service PRIVATE ${NL_CT_CFG}) +TARGET_COMPILE_DEFINITIONS(nl_sample_ct_gd_service PRIVATE ${NL_CT_CFG}) TARGET_LINK_LIBRARIES(nl_sample_ct_ai_service nelmisc nelnet) NL_DEFAULT_PROPS(nl_sample_ct_ai_service "NeL, Samples, Net, Class Transport: AI Service") diff --git a/nel/samples/net/login_system/CMakeLists.txt b/nel/samples/net/login_system/CMakeLists.txt index 97436fc90..f26449f12 100644 --- a/nel/samples/net/login_system/CMakeLists.txt +++ b/nel/samples/net/login_system/CMakeLists.txt @@ -2,7 +2,9 @@ ADD_EXECUTABLE(nl_sample_ls_client client.cpp) ADD_EXECUTABLE(nl_sample_ls_fes WIN32 frontend_service.cpp) -ADD_DEFINITIONS(-DNL_LS_CFG="\\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_login_system/\\"") +SET(NL_LS_CFG "NL_LS_CFG=\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_login_system/\"") +TARGET_COMPILE_DEFINITIONS(nl_sample_ls_client PRIVATE ${NL_LS_CFG}) +TARGET_COMPILE_DEFINITIONS(nl_sample_ls_fes PRIVATE ${NL_LS_CFG}) TARGET_LINK_LIBRARIES(nl_sample_ls_client nelmisc nelnet) NL_DEFAULT_PROPS(nl_sample_ls_client "NeL, Samples, Net, Login Service: LS Client") diff --git a/nel/samples/net/udp/CMakeLists.txt b/nel/samples/net/udp/CMakeLists.txt index cf935ea79..cf1350918 100644 --- a/nel/samples/net/udp/CMakeLists.txt +++ b/nel/samples/net/udp/CMakeLists.txt @@ -4,7 +4,9 @@ ADD_EXECUTABLE(nl_sample_udpclient client.cpp graph.cpp graph.h simlag.cpp simla ADD_EXECUTABLE(nl_sample_udpserver WIN32 bench_service.cpp receive_task.cpp receive_task.h) -ADD_DEFINITIONS(-DUDP_DIR="\\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_udp/\\"") +SET(UDP_DIR "UDP_DIR=\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_udp/\"") +TARGET_COMPILE_DEFINITIONS(nl_sample_udpclient PRIVATE ${UDP_DIR}) +TARGET_COMPILE_DEFINITIONS(nl_sample_udpserver PRIVATE ${UDP_DIR}) TARGET_LINK_LIBRARIES(nl_sample_udpclient nelmisc nelnet) TARGET_LINK_LIBRARIES(nl_sample_udpserver nelmisc nelnet) diff --git a/nel/samples/pacs/CMakeLists.txt b/nel/samples/pacs/CMakeLists.txt index 79839c126..a242e809b 100644 --- a/nel/samples/pacs/CMakeLists.txt +++ b/nel/samples/pacs/CMakeLists.txt @@ -2,7 +2,7 @@ FILE(GLOB SRC *.cpp *.h) ADD_EXECUTABLE(nl_sample_pacs WIN32 ${SRC}) -ADD_DEFINITIONS(-DNL_PACS_DATA="\\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_pacs/\\"") +TARGET_COMPILE_DEFINITIONS(nl_sample_pacs PRIVATE "NL_PACS_DATA=\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_pacs/\"") TARGET_LINK_LIBRARIES(nl_sample_pacs nelmisc nelpacs nel3d) NL_DEFAULT_PROPS(nl_sample_pacs "NeL, Samples: PACS") diff --git a/nel/samples/sound/sound_sources/CMakeLists.txt b/nel/samples/sound/sound_sources/CMakeLists.txt index 4c7c3d9cf..6172a0136 100644 --- a/nel/samples/sound/sound_sources/CMakeLists.txt +++ b/nel/samples/sound/sound_sources/CMakeLists.txt @@ -2,7 +2,7 @@ FILE(GLOB SRC *.cpp *.h) ADD_EXECUTABLE(nl_sample_sound_sources ${SRC}) -ADD_DEFINITIONS(-DNL_SOUND_DATA="\\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_sound/\\"") +TARGET_COMPILE_DEFINITIONS(nl_sample_sound_sources PRIVATE "NL_SOUND_DATA=\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_sound/\"") TARGET_LINK_LIBRARIES(nl_sample_sound_sources nelmisc nelsound) NL_DEFAULT_PROPS(nl_sample_sound_sources "NeL, Samples: Sound: Sound Sources")