FindROOT.cmake cannot locate root on Windows7

Dear experts:

I installed geant4.9.5.p01 on both ubuntu and windows7 (using latest cmake and visual studio).
On ubuntu, FindROOT.cmake can locate root successfully, but on windows7 it cannnot.

I guess this is because root-config is not executable on windows7.

Who can provide a solution to this?

Thanks a lot.

Fada

Findroot.camke defines:

- Finds ROOT instalation

This module sets up ROOT information

It defines:

ROOT_FOUND If the ROOT is found

ROOT_INCLUDE_DIR PATH to the include directory

ROOT_LIBRARIES Most common libraries

ROOT_LIBRARY_DIR PATH to the library directory

On Linux, we can use root-config --libs to obtain the value of variable ${ROOT_LIBRARIES}, which is:

-lGpad -lHist -lGraf -lGraf3d -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lRIO -lNet -lThread -lCore -lCint -pthread -lm -ldl –rdynamic

But, on windows, root-config cannot be executed, I don’t know the value of ${ROOT_LIBRARIES}. This is the key problem I’m meeting now.

Can anyone provide help?

Thanks a lot.

Fada

I solved this problem on Windows7 finally.

My method is:

Adding below lines in FindROOT.cmake files just after line 37.

#defined by fada, 2012-05-22
set(ROOTSYS D:/root)
set(ROOT_VERSION 5.30/00)
set(ROOT_INCLUDE_DIR ${ROOTSYS}/include)
set(ROOT_LIBRARY_DIR ${ROOTSYS}/lib)
set(ROOT_LIBRARIES -LIBPATH:${ROOT_LIBRARY_DIR} libGpad.lib libHist.lib libGraf.lib libGraf3d.lib libTree.lib libRint.lib libPostscript.lib libMatrix.lib libPhysics.lib libMathCore.lib libRIO.lib libNet.lib libThread.lib libCore.lib libCint.lib)

others settings in my project’s cmakelists.txt was guided by Dr. Ben Morgan.
hypernews.slac.stanford.edu/Hype … /1467.html

Now, there are no linking errors anymore. root files can be produced after execution of my application.