Fixed macos build problems
This commit is contained in:
parent
265a7253cc
commit
3fdeb074c1
13 changed files with 73 additions and 27 deletions
|
@ -7,12 +7,26 @@ target_include_directories(debug PRIVATE
|
|||
)
|
||||
|
||||
target_link_libraries(debug PRIVATE
|
||||
"$<TARGET_FILE_DIR:openglu>/$<TARGET_FILE_BASE_NAME:openglu>.lib"
|
||||
glfw
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(debug PRIVATE
|
||||
"$<TARGET_FILE_DIR:openglu>/$<TARGET_FILE_BASE_NAME:openglu>.lib"
|
||||
)
|
||||
else()
|
||||
target_link_libraries(debug PRIVATE
|
||||
$<TARGET_FILE:openglu>
|
||||
)
|
||||
endif()
|
||||
|
||||
add_custom_command(TARGET debug POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:openglu> $<TARGET_FILE:glfw> $<TARGET_FILE_DIR:debug>
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/shaders $<TARGET_FILE_DIR:debug>/shaders
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/assets $<TARGET_FILE_DIR:debug>/assets
|
||||
)
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
add_custom_command(TARGET debug POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:openglu> $<TARGET_FILE:glfw> $<TARGET_FILE_DIR:debug>
|
||||
)
|
||||
endif()
|
|
@ -118,8 +118,8 @@ int main(int argc, char** argv)
|
|||
camera.LookAt(0.0f, 0.0f, 0.0f);
|
||||
|
||||
shader->Use();
|
||||
shader->SetUniform("texture1", crate, 0);
|
||||
shader->SetUniform("texture2", opengl, 1);
|
||||
shader->SetUniformTexture("texture1", crate, 0);
|
||||
shader->SetUniformTexture("texture2", opengl, 1);
|
||||
shader->SetUniform("model", square);
|
||||
shader->SetUniformMatrix4fv("view", 1, GL_FALSE, glm::value_ptr(camera.GetMatrix()));
|
||||
shader->SetUniformMatrix4fv("projection", 1, GL_FALSE, glm::value_ptr(camera.GetProjection()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue