Re: [CMake] find_library doesn't find .dll on windows

2018-06-01 Thread Romain LEGUAY
Thank you for your answer. I just want to find the file libmysql.dll because it's needed to be used with Qt (unless I did not understand how to use Qt's MySQL driver). For now, I just do a simple copy of this file in my build folder, but it's not a good method. Romain Le ven. 1 juin 2018 à 17:5

Re: [CMake] Is there a way to obtain the current compiler standard flag?

2018-06-01 Thread Craig Scott
On Sat, Jun 2, 2018 at 6:32 AM, Chris Green wrote: > Ack! Apparently even the hard way won't work, because apparently one > cannot nest $ > set(CXX_STD_FLAG "$,\ > $>,${CMAKE_CXX11_EXTENSION_COMPILE_OPTION},\ > $>,${CMAKE_CXX14_EXTENSION_COMPILE_OPTION},\ > $>,${CMAKE_CXX17_EXTENSION_COMPILE_OPT

Re: [CMake] Is there a way to obtain the current compiler standard flag?

2018-06-01 Thread Chris Green
Ack! Apparently even the hard way won't work, because apparently one cannot nest $ set(CXX_STD_FLAG "$,\ $>,${CMAKE_CXX11_EXTENSION_COMPILE_OPTION},\ $>,${CMAKE_CXX14_EXTENSION_COMPILE_OPTION},\ $>,${CMAKE_CXX17_EXTENSION_COMPILE_OPTION},\ $>,${CMAKE_CXX20_EXTENSION_COMPILE_OPTION},\ ${CMAKE_CXX

Re: [CMake] Is there a way to obtain the current compiler standard flag?

2018-06-01 Thread Chris Green
Hi, I was hoping this would work: $,${CMAKE_CXX$_EXTENSION_COMPILE_OPTION},${CMAKE_CXX$_STANDARD_COMPILE_OPTION}> But apparently it's not legal to calculate a variable name based on a generator expression. Is there some elegant way to get want I want here or do I have to check specifically fo

Re: [CMake] find_library doesn't find .dll on windows

2018-06-01 Thread Juan E. Sanchez
My understanding is that you are supposed to link against the .lib file, and the .dll is used at runtime. From: https://dev.mysql.com/doc/refman/5.7/en/c-api-building-clients.html You link your code with either the dynamic or static C client library. On Windows, the static library is named mys

[CMake] find_library doesn't find .dll on windows

2018-06-01 Thread Romain LEGUAY
Hi everyone, I try to find MYSQL dynamic library on windows. For this, I use the following command: set(_PF86 "ProgramFiles(x86)") find_library( MYSQL_LIBRARY NAME "libmysql.dll" PATHS "$ENV{PROGRAMFILES}/MySQL/*/lib" "$ENV{${_PF86}}/MySQL/*/lib" "$ENV{SYSTEMDRIVE}/MySQL/*/lib" NO_DEFAULT_P

Re: [CMake] Is there a way to obtain the current compiler standard flag?

2018-06-01 Thread Chris Green
Hi, I'll give this a shot, thank you. Ideally we'd have a generator expression pick up ${std} from the relevant target property, but I'll have to play with that since I'm not familiar enough with generator expressions to know /a priori/ how this will turn out. Thanks for your help, Chris.