There's no way to set properties like LANGUAGE on files in a library
seperatly if those files are used in another library also...

PROJECT( project1 )
ADD_EXECUTABLE( ${PROJECT_NAME} sourcefile.c )
GET_TARGET_PROPERTY(SOURCES ${PROJECT_NAME} SOURCES)
set_source_files_properties( ${SOURCES} PROPERTIES LANGUAGE "CXX" )


PROJECT( project2 )
ADD_EXECUTABLE( ${PROJECT_NAME} sourcefile.c )
GET_TARGET_PROPERTY(SOURCES ${PROJECT_NAME} SOURCES)
set_source_files_properties( ${SOURCES} PROPERTIES LANGUAGE "C" )


Also, there's no way to just get the list of target outputs that a
executable or library was linked with?

TARGET_LINK_LIBRARIES( ${PROJECT_NAME} libxyz )

I tried to use


  GET_TARGET_PROPERTY(LIBS2 ${proj} IMPORTED_LINK_INTERFACE_LIBRARIES )
  message( "libs: ${LIBS2}" )
  GET_TARGET_PROPERTY(LIBS ${proj} IMPORTED_LINK_DEPENDENT_LIBRARIES )
  message( "libs: ${LIBS}" )

but the results are LIBS-NOTFOUND and LIBS2-NOTFOUND ....

This CMAKE installation steps seem to be unix-centric, in expecting to
target a consistant /usr/local/bin or /usr/bin etc for installation
targets.   This particular tree that I'm slowly migrating actually has
about a dozen individual targets, and each final installation needs to
include the program itslef, maybe some data associated with it and all
of the libraries it requires to link.  Each product needs to be self
contained, and I would think that cmake would have the target names of
all products built available that I could just get that list to copy
all of those into a final installation directory?
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to