[OpendTect_Developers] "CMake: Help with OD_MODULE_GUI_PROGS / OD_MODULE_PROGS macros"
oemergenc at gmail.com
oemergenc at gmail.com
Mon Apr 8 13:50:51 CEST 2013
Hey there,
i am trying to build a command line tool within my plugin environment.
To clarify:
I am using Visual Studio 2010. I have successfully created the Tutorial
Plugin.
Now i would like to integrate a new project in my plugin solution, which
when set as start-up project
starts a command line tool and does not starts OpendTect.
>From studying the OpendTect sources if found the two macros
OD_MODULE_GUI_PROGS
and OD_MODULE_PROGS defined in ODMacroUtils. I guess these are already
there for this purpose.
What i want is pretty much the same as the "od_FileBrowser" project within
OpendTect itself.
However CMake does not build successful, when i use one of these MACROS.
I am attaching the CMakeLists.txt, that i use for my command-line tool. It
is a pretty simple one.
The "main" function lies in the file "cmd_Test_App.cc", inside "main" i
create a instance of
a custom widget etc....
Here is the error message i got from CMake:
##############
CMake Error at
C:/dev/workspace/dtect_4_4_0/opendtect_pentouch/opendtect/CMakeModules/ODMacroUtils.cmake:320
(ADD_EXECUTABLE):
1> add_executable cannot create target "Test_GestureRecognizers" because
1> another target with the same name already exists. The existing
target is a
1> shared library created in source directory
1>
"C:/dev/workspace/dtect_4_4_0/opendtect_pentouch/pentouch_plugin/plugins/Test_GestureRecognizers".
1> See documentation for policy CMP0002 for more details.
##############
Is there something i am missing?
Any help would be greatly appreciated.
Thanks,
Ömer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opendtect.org/pipermail/developers/attachments/20130408/40c5d55e/attachment.html>
-------------- next part --------------
SET(OD_MODULE_DEPS uiODMain )
SET(OD_MODULE_SOURCES
testwidget.cc
)
#both of the following macros are not working
#SET( OD_MODULE_PROGS cmd_Test_App )
#SET( OD_MODULE_GUI_PROGS cmd_Test_App )
OD_INIT_MODULE()
More information about the Developers
mailing list