Re: [CMake] Imported libraries and cross platform target names

2015-08-21 Thread Ette, Anthony (CDS)
[mailto:dlrd...@aol.com] Sent: Friday, August 21, 2015 8:17 AM To: Ette, Anthony (CDS) Cc: Parag Chandra; CMake@cmake.org Subject: Re: [CMake] Imported libraries and cross platform target names Find_library results are cached. If you want to re-find a potentially moved library every time you run

Re: [CMake] Imported libraries and cross platform target names

2015-08-21 Thread David Cole via CMake
','CMake@cmake.org'); *Subject:* Re: [CMake] Imported libraries and cross platform target names Yes, very similar. When I set out to convert our existing build system, which consists of many individual .sln and .vcxproj files, I got a requirement that the developers do not all want to work out

Re: [CMake] Imported libraries and cross platform target names

2015-08-20 Thread Ette, Anthony (CDS)
...@controlsdata.commailto:anthony.r.e...@controlsdata.com From: Parag Chandra [mailto:pa...@ionicsecurity.com] Sent: Tuesday, August 18, 2015 3:08 PM To: Ette, Anthony (CDS); CMake@cmake.org Subject: Re: [CMake] Imported libraries and cross platform target names Yes, very similar. When I set out to convert our existing

Re: [CMake] Imported libraries and cross platform target names

2015-08-19 Thread Tamás Kenéz
. http://www.cmake.org/cmake/help/v3.3/command/find_library.html *From:* CMake [mailto:cmake-boun...@cmake.org cmake-boun...@cmake.org] *On Behalf Of *Ette, Anthony (CDS) *Sent:* Tuesday, August 18, 2015 1:30 PM *To:* CMake@cmake.org *Subject:* [CMake] Imported libraries and cross platform

Re: [CMake] Imported libraries and cross platform target names

2015-08-18 Thread Ette, Anthony (CDS)
] On Behalf Of Ette, Anthony (CDS) Sent: Tuesday, August 18, 2015 1:30 PM To: CMake@cmake.orgmailto:CMake@cmake.org Subject: [CMake] Imported libraries and cross platform target names Importance: High Given that add_library() produces a unique filename per platform (the actual file name of the library

Re: [CMake] Imported libraries and cross platform target names

2015-08-18 Thread Parag Chandra
@cmake.orgmailto:CMake@cmake.org Subject: Re: [CMake] Imported libraries and cross platform target names You just specify the “basename” of the library, so something like this: find_library (timer NAMES timer PATHS your/library/directory) target_link_libraries(test timer) And Cmake takes care of the rest. It’s

[CMake] Imported libraries and cross platform target names

2015-08-18 Thread Ette, Anthony (CDS)
Given that add_library() produces a unique filename per platform (the actual file name of the library built is constructed based on conventions of the native platform (such as libname.a orname.lib), how does one add the library to the final application without having to deal with the filename

Re: [CMake] Imported libraries and cross platform target names

2015-08-18 Thread Ette, Anthony (CDS)
: [CMake] Imported libraries and cross platform target names You just specify the “basename” of the library, so something like this: find_library (timer NAMES timer PATHS your/library/directory) target_link_libraries(test timer) And Cmake takes care of the rest. It’s even easier if “timer” is also

Re: [CMake] Imported libraries and cross platform target names

2015-08-18 Thread Miller Henry
: Tuesday, August 18, 2015 1:30 PM To: CMake@cmake.org Subject: [CMake] Imported libraries and cross platform target names Importance: High Given that add_library() produces a unique filename per platform (the actual file name of the library built is constructed based on conventions of the native

[CMake] Imported libraries and cross platform target names

2015-08-18 Thread J. Caleb Wherry
CMAKE_IMPORT_LIBRARY_PREFIX and CMAKE_IMPORT_LIBRARY_POSTFIX should get you what you want. Then you just have to have one set property: SET_PROPERTY(TARGET test PROPERTY IMPORTED_LOCATION ${LIB_D}/${CMAKE_IMPORT_LIBRARY_PREFIX} timer.${CMAKE_IMPORT_LIBRARY_POSTFIX}) -Caleb On Tuesday, August

Re: [CMake] Imported libraries and cross platform target names

2015-08-18 Thread Nils Gladitz
On 18.08.2015 20:29, Ette, Anthony (CDS) wrote: Given that add_library() produces a unique filename per platform (the “actual file name of the library built is constructed based on conventions of the native platform (such as libname.aorname.lib”), how does one add the library to the final

Re: [CMake] Imported libraries and cross platform target names

2015-08-18 Thread Parag Chandra
at 2:29 PM To: CMake@cmake.orgmailto:CMake@cmake.org CMake@cmake.orgmailto:CMake@cmake.org Subject: [CMake] Imported libraries and cross platform target names Given that add_library() produces a unique filename per platform (the “actual file name of the library built is constructed based

Re: [CMake] Imported libraries and cross platform target names

2015-08-18 Thread J Decker
target_link_libraries( final_project library ) ? On Tue, Aug 18, 2015 at 11:29 AM, Ette, Anthony (CDS) anthony.r.e...@controlsdata.com wrote: Given that add_library() produces a unique filename per platform (the “actual file name of the library built is constructed based on conventions of