Page 1 of 1

NoesisGUI with C++ and CMake

Posted: 19 Jan 2020, 18:01
by SajNoesis
So I've tried different ways to include NoesisGUI with CMake, and I haven't been able to do it. Can someone show their working CMakeLists or tell me the steps to make it work?

Re: NoesisGUI with C++ and CMake

Posted: 19 Jan 2020, 18:11
by unvestigate
Not sure what you are after. This is what I do:
add_library(noesis STATIC IMPORTED)
set_target_properties(noesis
	PROPERTIES
	INTERFACE_INCLUDE_DIRECTORIES	$ENV{BASIS_LIB2015_X64_PATH}/NoesisGUI-NativeSDK-2.2.4/Include
	IMPORTED_LOCATION_DEBUG		$ENV{BASIS_LIB2015_X64_PATH}/NoesisGUI-NativeSDK-2.2.4/Lib/windows_x86_64/Noesis.lib
	IMPORTED_LOCATION_RELEASE	$ENV{BASIS_LIB2015_X64_PATH}/NoesisGUI-NativeSDK-2.2.4/Lib/windows_x86_64/Noesis.lib
	IMPORTED_LOCATION_FINAL		$ENV{BASIS_LIB2015_X64_PATH}/NoesisGUI-NativeSDK-2.2.4/Lib/windows_x86_64/Noesis.lib
)
My game project then just lists "noesis" as a dependency. Finally, I need to include the dll/dylib which I copy over with a custom script. I am sure you can make CMake take care of that too. In this case the lib file is the same for all configurations but I usually link to different versions for different configurations. Hence the three lines.

Re: NoesisGUI with C++ and CMake

Posted: 19 Jan 2020, 18:37
by SajNoesis
Thank you very much! That actually seems more straight forward than I thought. I'll try to implement this now