SajNoesis
Topic Author
Posts: 2
Joined: 15 Sep 2019, 22:46

NoesisGUI with C++ and CMake

19 Jan 2020, 18:01

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?
 
unvestigate
Posts: 32
Joined: 17 Jan 2018, 09:55

Re: NoesisGUI with C++ and CMake

19 Jan 2020, 18:11

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.
 
SajNoesis
Topic Author
Posts: 2
Joined: 15 Sep 2019, 22:46

Re: NoesisGUI with C++ and CMake

19 Jan 2020, 18:37

Thank you very much! That actually seems more straight forward than I thought. I'll try to implement this now

Who is online

Users browsing this forum: Google [Bot] and 21 guests