[CMake] trouble setting library output directoy

Mike Jackson mike.jackson at imts.us
Tue Jul 15 22:01:26 EDT 2008


# ---------- Setup output Directories -------------------------
SET (LIBRARY_OUTPUT_PATH
   ${PROJECT_BINARY_DIR}/Bin
   CACHE PATH
   "Single Directory for all Libraries"
   )

This will effect all targets.

-- 
Mike Jackson   Senior Research Engineer
Innovative Management & Technology Services


On Jul 15, 2008, at 8:41 PM, Christopher Harvey wrote:

> Hi,
> I've got a root directory, say /
> and there is a CMakeLists.txt in it, that looks like this:
> ----------------
> CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
> PROJECT(GlewMingW)
> #SET(CMAKE_VERBOSE_MAKEFILE TRUE)
> INCLUDE_DIRECTORIES(include)
> ADD_LIBRARY(glew STATIC src/glew.c)
> #ADD_EXECUTABLE(visualinfo src/visualinfo.c)
> #ADD_EXECUTABLE(glewinfo src/glewinfo.c)
> SET_TARGET_PROPERTIES(glew PROPERTIES
> 			   COMPILE_FLAGS -O3
> 			   LIBRARY_OUTPUT_DIRECTORY lib
> 	             )
> #SET_TARGET_PROPERTIES(visualinfo PROPERTIES COMPILE_FLAGS -O3)
> #SET_TARGET_PROPERTIES(glewinfo PROPERTIES COMPILE_FLAGS -O3)
> #TARGET_LINK_LIBRARIES(glewinfo -glew opengl32 -mwindows)
> --------------------
>
> there is also a /lib directory with nothing in it.
> The problem is then when I run cmake ./ it says that there are no
> problems, and it compiles with ming32-make as well. The only thing is
> that libglew.a appears in / rather than the /lib directory. I've
> googled around but wasn't able to find an example that did what I
> wanted it to do. Thanks for reading,
> Chris.
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>




More information about the CMake mailing list