Re: [CMake] Compiling OpenGL application with CMake

2009-02-25 Thread Mathieu Malaterre
On Fri, Feb 20, 2009 at 2:36 AM, Andrea Tagliasacchi wrote: > Thanks Philip, > > that worked flawlessly! > > I would say that this is the most compact CMake specification to compile > a Glut/OpenGL application then: > > find_package(GLUT) > find_package(OpenGL) > INCLUDE_DIRECTORIES(${OPENGL_INCLU

Re: [CMake] Compiling OpenGL application with CMake

2009-02-24 Thread Christopher Harvey
Packages don't have to be required because many projects don't require every single library they can use. For example, not requiring libpng just means if it's not on the system then your project can't open pngs. Andrea Tagliasacchi wrote: > This is a bit odd to me. Why would not everything be requ

Re: [CMake] Compiling OpenGL application with CMake

2009-02-24 Thread Philip Lowman
On Tue, Feb 24, 2009 at 8:48 PM, Andrea Tagliasacchi wrote: > This is a bit odd to me. Why would not everything be required? > Are there situations in which you might not need a package? > > Maybe I can answer my own question... > > If you have 2 libraries A and B that do the same task maybe you

Re: [CMake] Compiling OpenGL application with CMake

2009-02-24 Thread Andrea Tagliasacchi
This is a bit odd to me. Why would not everything be required? Are there situations in which you might not need a package? Maybe I can answer my own question... If you have 2 libraries A and B that do the same task maybe you can use different compile rules like you showed below, while if A is the

Re: [CMake] Compiling OpenGL application with CMake

2009-02-19 Thread Philip Lowman
On Thu, Feb 19, 2009 at 8:36 PM, Andrea Tagliasacchi wrote: > Thanks Philip, > > that worked flawlessly! > > I would say that *this* is the most compact CMake specification to compile > > a Glut/OpenGL application then: > > *find_package(GLUT) > find_package(OpenGL) > INCLUDE_DIRECTORIES(${OPENGL

Re: [CMake] Compiling OpenGL application with CMake

2009-02-19 Thread Andrea Tagliasacchi
Thanks Philip, that worked flawlessly! I would say that *this* is the most compact CMake specification to compile a Glut/OpenGL application then: *find_package(GLUT) find_package(OpenGL) INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) ADD_EXECUTABLE(mesh_view mesh_view.cpp) TARGET_LINK_LIBRARIES(mesh

Re: [CMake] Compiling OpenGL application with CMake

2009-02-19 Thread Philip Lowman
On Thu, Feb 19, 2009 at 8:18 PM, Andrea Tagliasacchi wrote: > Hello everybody, > > I have given up on Makefiles, implicit rules and unreadability just annoyed > me. > Also the ability of generating cross platform compile files is very > appealing. > > As far as I compile my independent code (no e

[CMake] Compiling OpenGL application with CMake

2009-02-19 Thread Andrea Tagliasacchi
Hello everybody, I have given up on Makefiles, implicit rules and unreadability just annoyed me. Also the ability of generating cross platform compile files is very appealing. As far as I compile my independent code (no external libraries) everything goes fine. However, one of my applications is