Closed madebr closed 3 years ago
By applying them on the target, these are also available in the installed libconfigConfig.cmake scripts
The DEFINE_SYMBOL property is only active when building shared libraries.
DEFINE_SYMBOL
This also fixes building libconfig on Linux with a mingw toolchain.
CMAKE_HOST_WIN32 is a property for the system running cmake. See CMAKE_HOST_SYSTEM for seeing what host means.
CMAKE_HOST_WIN32
CMAKE_HOST_SYSTEM
For cross building, you need to use CMAKE_SYSTEM_NAME. But here we are happy with WIN32 and MSVC.
CMAKE_SYSTEM_NAME
WIN32
MSVC
After this pr, an install prefix (for a shared libconfig) looks like this:
prefix ├── bin │ ├── libconfig++.dll │ └── libconfig.dll ├── include │ ├── libconfig.h │ ├── libconfig.h++ │ └── libconfig.hh └── lib ├── cmake │ └── libconfig │ ├── libconfig++Config.cmake │ ├── libconfigConfig.cmake │ ├── libconfig++Config-noconfig.cmake │ ├── libconfigConfig-noconfig.cmake │ ├── libconfig++ConfigVersion.cmake │ └── libconfigConfigVersion.cmake ├── libconfig++.dll.a └── libconfig.dll.a
Would you mind to rebase this CL? It has a merge conflict now...then I'll merge.
@hyperrealm I've rebased this pr.
Thanks!
By applying them on the target, these are also available in the installed libconfigConfig.cmake scripts
The
DEFINE_SYMBOL
property is only active when building shared libraries.This also fixes building libconfig on Linux with a mingw toolchain.
CMAKE_HOST_WIN32
is a property for the system running cmake. SeeCMAKE_HOST_SYSTEM
for seeing what host means.For cross building, you need to use
CMAKE_SYSTEM_NAME
. But here we are happy withWIN32
andMSVC
.After this pr, an install prefix (for a shared libconfig) looks like this: