Skip to content

Commit

Permalink
fix cmake in linux
Browse files Browse the repository at this point in the history
  • Loading branch information
MihailRis committed Dec 27, 2024
1 parent 6cb0d31 commit d73c0b2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ target_link_libraries(${PROJECT_NAME} VoxelEngineSrc ${CMAKE_DL_LIBS})
add_custom_command(
TARGET ${PROJECT_NAME}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_CURRENT_SOURCE_DIR}/res
$<TARGET_FILE_DIR:${PROJECT_NAME}>/res
)
Expand Down
3 changes: 2 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ find_package(GLEW REQUIRED)
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
# specific for vcpkg
find_package(OpenAL CONFIG REQUIRED)
set(OPENAL_LIBRARY OpenAL::OpenAL)
else()
find_package(OpenAL REQUIRED)
endif()
Expand Down Expand Up @@ -69,4 +70,4 @@ endif()
include_directories(${LUA_INCLUDE_DIR})
include_directories(${CURL_INCLUDE_DIR})
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(${PROJECT_NAME} ${LIBS} glfw OpenGL::GL OpenAL::OpenAL GLEW::GLEW ZLIB::ZLIB PNG::PNG CURL::libcurl ${VORBISLIB} ${LUA_LIBRARIES} ${CMAKE_DL_LIBS})
target_link_libraries(${PROJECT_NAME} ${LIBS} glfw OpenGL::GL ${OPENAL_LIBRARY} GLEW::GLEW ZLIB::ZLIB PNG::PNG CURL::libcurl ${VORBISLIB} ${LUA_LIBRARIES} ${CMAKE_DL_LIBS})
1 change: 0 additions & 1 deletion src/lighting/LightSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ void LightSolver::add(int x, int y, int z, int emission) {
}

void LightSolver::add(int x, int y, int z) {
assert (chunks != nullptr);
add(x,y,z, chunks.getLight(x,y,z, channel));
}

Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ target_link_libraries(
add_custom_command(
TARGET ${PROJECT_NAME}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_SOURCE_DIR}/res
${CMAKE_CURRENT_BINARY_DIR}/res
)
Expand Down

0 comments on commit d73c0b2

Please sign in to comment.