Browse Source

fixes to cmake cfg windows

dev
Otto Naderer 2 months ago
parent
commit
0a39403f8d
  1. 12
      CMakeLists.txt

12
CMakeLists.txt

@ -25,11 +25,14 @@ add_subdirectory(${ENET_DIR} EXCLUDE_FROM_ALL)
#zlib stuff
set(ZLIB_TARGET zlibstatic)
set(ZLIB_DIR "${CMAKE_CURRENT_LIST_DIR}/zlib")
set(ZLIB_INC_DIR ${ZLIB_DIR}/include)
set(ZLIB_INC_DIR ${ZLIB_DIR})
set(ZLIB_CONF_DIR ${CMAKE_CURRENT_BINARY_DIR}/zlib)
add_subdirectory(${ZLIB_DIR} EXCLUDE_FROM_ALL)
#irrlicht stuff
set(IRRLICHT_INC_DIR /usr/include/irrlicht)
if (NOT IRRLICHT_INC_DIR)
set(IRRLICHT_INC_DIR /usr/include/irrlicht)
endif()
project(irrnet)
@ -47,8 +50,13 @@ add_library(${IRRNET_TARGET} STATIC
if (OP_COMPILE_WITH_IRRLICHT)
message(STATUS "compile with native irrlicht")
add_definitions(-DCOMPILE_WITH_IRRLICHT)
message(STATUS "irrlicht dir: " ${IRRLICHT_INC_DIR})
target_include_directories(${IRRNET_TARGET} PUBLIC ${IRRLICHT_INC_DIR})
endif()
target_link_libraries(${IRRNET_TARGET} ${ZLIB_TARGET} ${ENET_TARGET})
target_include_directories(${IRRNET_TARGET} PUBLIC ${IRRNET_INC_DIR} ${ENET_INC_DIR} ${ZLIB_INC_DIR})
message(STATUS "conf dir" ${ZLIB_CONF_DIR})
target_include_directories(${IRRNET_TARGET} PRIVATE ${ZLIB_CONF_DIR})

Loading…
Cancel
Save