CMake

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: CMake

Postby Slick » Fri Oct 26, 2018 10:12 am

Also I just noticed now that newton and dNewton are set to build as dll's even though I said static libs.
Slick
 
Posts: 330
Joined: Sat Feb 07, 2004 7:24 pm
Location: LA last and France now

Re: CMake

Postby Slick » Fri Oct 26, 2018 10:23 am

Sorry hang on. I just realised this time I left dll checked in CMake. Checking again.
Slick
 
Posts: 330
Joined: Sat Feb 07, 2004 7:24 pm
Location: LA last and France now

Re: CMake

Postby Slick » Fri Oct 26, 2018 10:30 am

Ok sorry for the confusion. It is improved from where it was. The libraries copy correctly. To be more perfect the headers for dgCore, dgPhysics and dVehicle are not being copied.
Slick
 
Posts: 330
Joined: Sat Feb 07, 2004 7:24 pm
Location: LA last and France now

Re: CMake

Postby Julio Jerez » Fri Oct 26, 2018 10:41 am

and this is when build static libraries?
ok I fix later, my time is up now.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: CMake

Postby Slick » Fri Oct 26, 2018 10:46 am

Yep static
Slick
 
Posts: 330
Joined: Sat Feb 07, 2004 7:24 pm
Location: LA last and France now

Re: CMake

Postby arpio » Fri Oct 26, 2018 11:59 am

If someone on windows system would like to try these Cmake files?
Attachments
newton-dynamics.zip
(163.7 KiB) Downloaded 333 times
arpio
 
Posts: 23
Joined: Wed Oct 24, 2018 4:33 pm

Re: CMake

Postby Slick » Fri Oct 26, 2018 12:10 pm

I'll give it a shot. Been spending some time on it recently :o
Slick
 
Posts: 330
Joined: Sat Feb 07, 2004 7:24 pm
Location: LA last and France now

Re: CMake

Postby Slick » Fri Oct 26, 2018 12:13 pm

I copied it over my current and got this:
Code: Select all
build visual studio projects
link to static runtime libraries
build 32 bit
CMAKE_CXX_FLAGS_DEBUG is /MTd /Zi /W4 /Od
CMAKE_CXX_FLAGS_RELEASE is /MT /arch:SSE2 /Zi /W4 /Ox /Oi /Ot /Ob2 /fp:fast
dMath
CMake Error at sdk/dMath/CMakeLists.txt:21 (set_target_properties):
  set_target_properties Can not find target to add properties to: dMath


dgCore
CMake Error at sdk/dgCore/CMakeLists.txt:21 (set_target_properties):
  set_target_properties Can not find target to add properties to: dgCore


dScene
CMake Error at sdk/dScene/CMakeLists.txt:21 (set_target_properties):
  set_target_properties Can not find target to add properties to: dScene


dNewton
CMake Error at sdk/dNewton/CMakeLists.txt:21 (set_target_properties):
  set_target_properties Can not find target to add properties to: dNewton


dVehicle
CMake Error at sdk/dVehicle/CMakeLists.txt:21 (set_target_properties):
  set_target_properties Can not find target to add properties to: dVehicle


newton
CMake Error at sdk/dgNewton/CMakeLists.txt:21 (set_target_properties):
  set_target_properties Can not find target to add properties to: newton


dgPhysics
CMake Error at sdk/dgPhysics/CMakeLists.txt:23 (set_target_properties):
  set_target_properties Can not find target to add properties to: dgPhysics


dAnimation
CMake Error at sdk/dAnimation/CMakeLists.txt:21 (set_target_properties):
  set_target_properties Can not find target to add properties to: dAnimation


dContainers
CMake Error at sdk/dContainers/CMakeLists.txt:21 (set_target_properties):
  set_target_properties Can not find target to add properties to: dContainers


dCustomJoints
CMake Error at sdk/dCustomJoints/CMakeLists.txt:21 (set_target_properties):
  set_target_properties Can not find target to add properties to:
  dCustomJoints


tinyxml
glfw
imgui
dgNewtonAvx
demosSandbox
DebugRelease
Configuring incomplete, errors occurred!
See also "S:/Newton/Build/CMakeFiles/CMakeOutput.log".
Slick
 
Posts: 330
Joined: Sat Feb 07, 2004 7:24 pm
Location: LA last and France now

Re: CMake

Postby arpio » Fri Oct 26, 2018 12:18 pm

Try to move this part to the end of the file before the install part

if (MSVC)
set_target_properties(${projectName} PROPERTIES COMPILE_FLAGS "/YudAnimationStdAfx.h")
set_source_files_properties(dAnimationStdAfx.cpp PROPERTIES COMPILE_FLAGS "/YcdAnimationStdAfx.h")
endif(MSVC)
Attachments
newton-dynamics.zip
(32.23 KiB) Downloaded 313 times
arpio
 
Posts: 23
Joined: Wed Oct 24, 2018 4:33 pm

Re: CMake

Postby Slick » Fri Oct 26, 2018 12:41 pm

Ok did that and it worked. Overall it looks quite good. Under S:\Newton\Build\lib there is debug and release for libs. After you build install it copies another set of libs to S:\Newton\Build\lib. It almost seems like the install for libs part is not needed. I'm not sure about the headers when they get copied. The headers are all in one directory which some people may prefer instead of folders.
Slick
 
Posts: 330
Joined: Sat Feb 07, 2004 7:24 pm
Location: LA last and France now

Re: CMake

Postby Julio Jerez » Fri Oct 26, 2018 12:58 pm

I am looking at that download and It seem to already removed the statement
if (GENERATE_DLL)
is that what this does? before I merge it

all the scripts looks far smaller now, do the include everything?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: CMake

Postby Slick » Fri Oct 26, 2018 1:11 pm

I know it's getting a bit confusing with all these versions. I think you are right that everything is getting close to working well.

For the download version it needs all these stripped out as arpio said:
Code: Select all
if (MSVC)
set_target_properties(${projectName} PROPERTIES COMPILE_FLAGS "/YudAnimationStdAfx.h")
set_source_files_properties(dAnimationStdAfx.cpp PROPERTIES COMPILE_FLAGS "/YcdAnimationStdAfx.h")
endif(MSVC)


Aside from that the directory structure is quite nice but headers are all in one folder. The install seems to duplicate libs too.
Slick
 
Posts: 330
Joined: Sat Feb 07, 2004 7:24 pm
Location: LA last and France now

Re: CMake

Postby Julio Jerez » Fri Oct 26, 2018 1:22 pm

I probably merged incorrectly I get these errors now, lots of them
Code: Select all
8>C:\Users\jjerez\Documents\GitHub\newton-dynamics\sdk\dgMeshUtil\dgMeshEffect1.cpp(4010): fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "dAnimationStdAfx.h"' to your source?
8>  dgMeshEffect2.cpp
8>C:\Users\jjerez\Documents\GitHub\newton-dynamics\sdk\dgMeshUtil\dgMeshEffect2.cpp(1221): fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "dAnimationStdAfx.h"' to your source?
8>  dgMeshEffect3.cpp
8>C:\Users\jjerez\Documents\GitHub\newton-dynamics\sdk\dgMeshUtil\dgMeshEffect3.cpp(1373): fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "dAnimationStdAfx.h"' to your source?
8>  dgMeshEffect4.cpp
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: CMake

Postby Slick » Fri Oct 26, 2018 1:26 pm

If you used his download version strip out from each cmakelist the code mentioned. Actually he said move. I have deleted my entire folder so many times I just copied his makelists and removed that section and it worked. I didn't do another entire delete.
Last edited by Slick on Fri Oct 26, 2018 1:28 pm, edited 1 time in total.
Slick
 
Posts: 330
Joined: Sat Feb 07, 2004 7:24 pm
Location: LA last and France now

Re: CMake

Postby arpio » Fri Oct 26, 2018 1:27 pm

Yes, there is no option generatedll. In the second download I fixed the "set_target_properties" issue. Will do some changes so its not dublicating the libs. How about the headers? Do you want them in a separate directory?

All that sometimes tonight or tomorrow.

Just realized there some issues in the second download too.
arpio
 
Posts: 23
Joined: Wed Oct 24, 2018 4:33 pm

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 15 guests

cron