[CMake] target_link_libraries and Custom Properties

2018-05-09 Thread Marek Vojtko (Firaxis)
Hi, I have multiple library targets that each provide shader files and headers. I also have multiple executable targets that each depend on a different set of these library targets. The executable targets need to collect the shader files and headers of only the libraries they depend on in

Re: [CMake] IMPORTED DLL-only Target on MSVC

2018-04-03 Thread Marek Vojtko (Firaxis)
> > Is it not possible to wrap an external DLL-only library in an IMPORTED > > target? > > > > Yes it is. > > > I have an external dependency that is a single DLL (shared library) and a > > header file, but no LIB (static library) file. > > How does this work in Visual Studio C++? If I am not

[CMake] IMPORTED DLL-only Target on MSVC

2018-04-02 Thread Marek Vojtko (Firaxis)
Hi, Is it not possible to wrap an external DLL-only library in an IMPORTED target? I have an external dependency that is a single DLL (shared library) and a header file, but no LIB (static library) file. When I create an IMPORTED target and depend on it via target_link_libraries() I run into

Re: [CMake] Custom Configurations and CMAKE__FLAGS__INIT

2018-03-22 Thread Marek Vojtko (Firaxis)
It turns out, as of CMake 3.11, this works. Thanks to Beren Minor's commit 48f7e2d3, CMake 3.11 has a new CMakeInitializeConfigs.cmake module that handles all _INIT variables, even custom configuration ones, correctly. Yay! [0]

[CMake] Custom Configurations and CMAKE__FLAGS__INIT

2018-03-21 Thread Marek Vojtko (Firaxis)
Hi, Do CMAKE__FLAGS__INIT variables not automatically populate CMAKE__FLAGS_ variables for *custom* configurations? When I use the _INIT variables for one of the default configuration names, e.g. CMAKE_C_FLAGS_DEBUG_INIT or CMAKE_C_FLAGS_RELEASE_INIT, they correctly populate their "usage"

[CMake] Copying Shared Libraries (DLLs) Next to the Executable

2018-02-21 Thread Marek Vojtko (Firaxis)
Hi, I need to copy external shared libraries (DLLs on Windows) next to the generated executable. Is calling "cmake -E copy_if_different" through a custom command added to the executable target still the best way to achieve this? CMake tracks include directories, compile definitions or options,

[CMake] Apple Metal Support in Xcode?

2015-04-28 Thread Marek Vojtko (Firaxis)
Hi, I'm trying to get Apple's new shading language, Metal, to work with my CMake project, but I am not having any luck. Xcode will automagically compile .metal files that are part of the project, but their Type (in the File Inspector in the right-hand Utilities pane) has to be set to Default

[CMake] Variable Containing MSVC and MATCHES

2014-03-12 Thread Marek Vojtko (Firaxis)
Hi, I know that MSVC is a CMake keyword and it is therefore not a good idea to use the string MSVC as the value for any variable, e.g. set( compiler MSVC ), because if you aren't careful and interpret such a variable without surrounding it with quotes (e.g. ${compier} rather than ${compiler})

Re: [CMake] CMake Tools for Visual Studio 1.0 Released!

2013-08-26 Thread Marek Vojtko (Firaxis)
On Mon, 26 Aug 2013 16:30:08 +0200, Niels Dekker wrote: On 2013-08-26 14:33, David Golub wrote: The two version differ solely in their version number, as there were no bugs reported in RC3. Actually, I did report an issue on RC3, asking for lowercase code completion of CMake commands:

[CMake] MACOSX_PACKAGE_LOCATION Not Working?

2013-05-07 Thread Marek Vojtko (Firaxis)
Hi, I am trying to copy assets (textures) into an application bundle in my project's CMake file. The solution that has brought me the closest was the following: // ${ASSETS_DIR} points to a directory in my project that contains the textures file( GLOB Textures ${ASSETS_DIR}/*.dds ) file( GLOB