[CMake] faking convenience libraries
Brandon J. Van Every
bvanevery at gmail.com
Thu Jan 25 01:56:19 EST 2007
Bill Hoffman wrote:
>
> You can not use FIND_* stuff because the files will not be there.
> There is a risk that cmake could change where the .o files are put.
> To mitigate that risk, I would recommend setting up everything with
> variables. You already have these
> ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}. That will give you the
> CMakeFiles directory, then each library is in LibName.dir and the obj
> files should be in there. It would be safest to write a macro that
> converts a source name into a .o name, that way if cmake changes, you
> can just change the macro.
How will I extract the type of build at configuration time? Currently
I'm using code such as:
SET(PCRE_FOR_SHARED_OBJ_DIR
${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/libpcre-for-shared.dir/${CMAKE_BUILD_TYPE})
but CMAKE_BUILD_TYPE has no value when running CMakeSetup for VS71.
Cheers,
Brandon Van Every
More information about the CMake
mailing list