Install and compile irrlicht on windows (CLION)

你离开我真会死。 提交于 2021-02-11 12:31:58

问题


I'm a student developer and I've always dev on Linux. This is the first project I have to do crossplateform. So I installed Git Bash, Visual Studio Pro and CLion on Windows. Usually I compile with GCC and Makefiles. So on Linux I installed the lib run the examples of the lib and it work. But when I want to compile it on Windows, it gets complicated.

I use the example files given by Irrlicht to make sure it doesn't come from the sources.

Here is my CMakeLists.txt

cmake_minimum_required(VERSION 3.9)
project(bomberman)

set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
set(CMAKE_CXX_STANDARD 11)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)

find_package(Irrlicht)


link_libraries(Irrlicht)

INCLUDE_DIRECTORIES(
        "/usr/include/irrlicht"
${PROJECT_SOURCE_DIR}/include
)
include_directories(inc)

add_executable(bomberman
 src/main.cpp)

I didn't install Irrlicht on Windows because I don't know how to do it. So, I tried many things and look around the Internet, actually I add:

  • Irrlicht.exp
  • Irrlicht.lib

And I put it at the root of the project but I don't know where to put all the lib with the H points. And I don't know how to optimize CROSSPLATEFORM. If anyone has tips, tuto, advice I'm really into.

Thank you in advance the community.


回答1:


Your CMakeList doesn't have to work on windows you just have to provide an .exe installer that install the project on the server.

This is my interpretation of the indie_studio subject:

You MUST use CMake as a cross-platform build system (it just cmake description not a requirement):

•Linux: the Makefile generated by cmake must have an install target which will install the required libraries and the game on the system.

•Windows: you must provide an executable installer file. Various programs let you easily create an installer.

good luck :)



来源:https://stackoverflow.com/questions/50279559/install-and-compile-irrlicht-on-windows-clion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!