[CMake] ARCHIVE_OUTPUT_DIRECTORY seems to not work

Andrea Galeazzi Galeazzi at korg.it
Tue Nov 16 12:18:33 EST 2010


I'm trying to compile a static library named libkernel.a into a custom 
path. I tried to set ARCHIVE_OUTPUT_DIRECTORY in two ways:
1:
set_property(TARGET PROPERTY ARCHIVE_OUTPUT_DIRECTORY 
"O:/kernel/${CMAKE_SYSTEM_NAME}/${CMAKE_BUILD_TYPE}")
 message("library output: ${ARCHIVE_OUTPUT_DIRECTORY}")
add_library( Kernel STATIC ${SOURCES} )
2:
 set(ARCHIVE_OUTPUT_DIRECTORY 
"O:/kernel/${CMAKE_SYSTEM_NAME}/${CMAKE_BUILD_TYPE}")
  message("library output: ${ARCHIVE_OUTPUT_DIRECTORY}")
  add_library( Kernel STATIC ${SOURCES} )

but  the file libkernel.a is always created into the build directory. 
Furthermore in the first case the output of  message("library output: 
${ARCHIVE_OUTPUT_DIRECTORY}") is: << library output. >>
I currently use eclipse CDT - MinGW.
Maybe I miss something but what?

 



More information about the CMake mailing list