Greetings, I am learning cmake.
I have a question on using add_library. in my project(learnCMAKE). The latter has:- ---a) 2 source files file1.c file2.c ---b) the envar {CFLAGS} set ---c) need to generate libLearnCMAKE.so and libLearnCMAKE.a ---d) need to add preprocessor agruments -DXXX to CFLAGS in the compilation of the source files before liberies are archived like so:- gcc ${CFLAGS} -DDINT /path/to/file1.c gcc ${CFLAGS} -DDINT /path/to/file2.c gcc ${CFLAGS} -DDLONG /path/to/file1.c gcc ${CFLAGS} -DDLONG /path/to/file2.c How can this be achived in a marco or whatever with add_library ? Help would be appreciated sincerely lux-integ _______________________________________________ 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