Re: [CMake] CMake removes /DEF: option in CMAKE_SHARED_LINKER_FLAGS

2019-10-08 Thread Alexander
Hi Craig, Thank you for this information. I never tried this way with the own CMakeLists.txt and I should try it. I found one efficient workaround however which is the option -DCMAKE_CXX_STANDARD_LIBRARIES=/DEF:additionalDefFile.def. It turned that the content of CMAKE_CXX_STANDARD_LIBRARIES is

Re: [CMake] CMake removes /DEF: option in CMAKE_SHARED_LINKER_FLAGS

2019-10-05 Thread Craig Scott
On Sat, Oct 5, 2019 at 12:59 AM Alexander wrote: > Dear Cristian, > > It would better for me not modifying CMakeFiles.txt, because as I wrote it > is 3rd party stuff (we just download it and build, but some different way). > My concern is why the command line option -DCMAKE_SHARED_LINKER_FLAGS >

Re: [CMake] CMake removes /DEF: option in CMAKE_SHARED_LINKER_FLAGS

2019-10-04 Thread Alexander
Dear Cristian, It would better for me not modifying CMakeFiles.txt, because as I wrote it is 3rd party stuff (we just download it and build, but some different way). My concern is why the command line option -DCMAKE_SHARED_LINKER_FLAGS deliberately ignores /DEF: option. It this behavior expected?

Re: [CMake] CMake removes /DEF: option in CMAKE_SHARED_LINKER_FLAGS

2019-10-04 Thread Cristian Adam
Hi, You should simply add the my_defs.def file as a source files to add_library/add_executable. CMake will automagically pass /DEF: to the linker with my_defs.def Cheers, Cristian. On Fri, Oct 4, 2019 at 4:45 PM Alexander wrote: > Hello, > > I would like to add an extra .defs file for linking

[CMake] CMake removes /DEF: option in CMAKE_SHARED_LINKER_FLAGS

2019-10-04 Thread Alexander
Hello, I would like to add an extra .defs file for linking of a DLL on Windows. I want to use the CMake command line option -DCMAKE_SHARED_LINKER_FLAGS="/DEF:my_defs.defs". I expect that besides the automatically generated /bin/.dir/Release/exports.def i see additionally /DEF:my_defs.defs in the