tags:

views:

35

answers:

1
+2  A: 

The LIBRARY_OUTPUT_DIRECTORY target property specifies the directory where library target files will be built.

set_target_properties(JE3D PROPERTIES
         LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/out/library)

If all the libraries are in one directory, I find it more convenient to set the CMAKE_LIBRARY_OUTPUT_DIRECTORY variable, which is used to initialize the LIBRARY_OUTPUT_DIRECTORY property when creating a target.

set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/out/library)
Jim Huang
The reason you can't just use path components in the library name is because CMake is simplistically mangling that name to get the library name. On your host, it's using the pattern `lib${FILE}.a`, which doesn't work when you try to use a path.
Jack Kelly
Ah, I understand!
Jookia