@@ -8,8 +8,8 @@ project "NetLeaf"
88 kind " SharedLib"
99 language " C++"
1010 location " NetLeaf"
11- targetdir (" build/bin/ " )
12- objdir (" obj/" )
11+ targetdir (" %{wks.location}/ build/bin" )
12+ objdir (" %{wks.location}/ obj/%{prj.name} " )
1313
1414 files {
1515 " NetLeaf/**.cpp" ,
@@ -33,11 +33,14 @@ project "NetLeaf"
3333 defines { " WIN32" , " _WINDOWS" }
3434
3535 postbuildcommands {
36- -- Copy headers to include directory
36+ -- Copy headers to shared include dir
3737 " {COPY} %{prj.location}/*.h %{wks.location}/build/include/" ,
3838 " {COPY} %{prj.location}/include/*.h %{wks.location}/build/include/" ,
39+
40+ -- Copy .NET dlls
41+ " {COPY} %{prj.location}/bin/*.dll %{wks.location}/build/bin/"
3942 }
40-
43+
4144 filter " system:linux"
4245 defines { " LINUX" }
4346
@@ -57,55 +60,61 @@ externalproject "NetLeaf.Bridge"
5760
5861-- Unit Tests
5962group " Tests"
60- -- C++ Unit Tests
61- project " CPPTests"
62- kind " ConsoleApp"
63- language " C++"
64- location " Tests/CPPTests"
65- targetdir " Tests/bin/%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
66-
67- includedirs {
68- " Tests/CPPTests/thirdparty/doctest" ,
69- " NetLeaf/include"
70- }
7163
72- libdirs {
73- " build/lib"
74- }
64+ -- C++ Unit Tests
65+ project " CPPTests"
66+ kind " ConsoleApp"
67+ language " C++"
68+ location " Tests/CPPTests"
69+ targetdir (" %{wks.location}/Tests/bin" )
70+ objdir (" %{wks.location}/obj/%{prj.name}" )
7571
76- files {
77- " Tests/CPPTests/**.cpp" ,
78- " Tests/CPPTests/**.h"
79- }
72+ files {
73+ " Tests/CPPTests/**.cpp" ,
74+ " Tests/CPPTests/**.h"
75+ }
8076
81- removefiles {
82- " Tests/CPPTests/thirdparty/**.h"
83- }
77+ removefiles {
78+ " Tests/CPPTests/thirdparty/**.h"
79+ }
80+
81+ includedirs {
82+ " Tests/CPPTests/thirdparty/doctest" ,
83+ " NetLeaf/include"
84+ }
85+
86+ libdirs {
87+ " %{wks.location}/build/bin/%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
88+ }
89+
90+ links {
91+ " NetLeaf" ,
92+ " NetLeaf.Bridge" ,
93+ " CSharpTests"
94+ }
8495
85- -- Link against NetLeaf
86- links {
87- " NetLeaf" ,
88- " NetLeaf.Bridge" ,
89- " CSharpTests"
96+ filter " system:windows"
97+ systemversion " latest"
98+ defines { " WIN32" , " _WINDOWS" }
99+
100+ postbuildcommands {
101+ -- Copy DLLs from NetLeaf.
102+ " {COPY} %{wks.location}/build/bin/*.dll %{cfg.targetdir}"
90103 }
91104
92- filter " system:windows"
93- systemversion " latest"
94- defines { " WIN32" , " _WINDOWS" }
95-
96- filter " system:linux"
97- defines { " LINUX" }
98-
99- filter " configurations:Debug"
100- defines { " DEBUG" }
101- symbols " On"
102-
103- filter " configurations:Release"
104- defines { " NDEBUG" }
105- optimize " On"
106-
107- -- C# Unit Tests
108- externalproject " CSharpTests"
109- location " Tests/CSharpTests"
110- kind " SharedLib"
111- language " C#"
105+ filter " system:linux"
106+ defines { " LINUX" }
107+
108+ filter " configurations:Debug"
109+ defines { " DEBUG" }
110+ symbols " On"
111+
112+ filter " configurations:Release"
113+ defines { " NDEBUG" }
114+ optimize " On"
115+
116+ -- C# Unit Tests
117+ externalproject " CSharpTests"
118+ location " Tests/CSharpTests"
119+ kind " SharedLib"
120+ language " C#"
0 commit comments