Skip to content

Commit

Permalink
sigh i hate windwos
Browse files Browse the repository at this point in the history
  • Loading branch information
anchpop committed Aug 16, 2024
1 parent b1361cb commit 2873332
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Install dependencies (Windows)
if: matrix.os == 'windows-latest'
run: |
choco install cmake ninja glfw3 openal
choco install cmake ninja openal
- name: Configure CMake
run: |
Expand Down
15 changes: 10 additions & 5 deletions OpenGL/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ file(GLOB_RECURSE header_files "src/*.h")
find_package(OpenGL REQUIRED)

## GLFW
find_package(PkgConfig REQUIRED)
pkg_check_modules(GLFW REQUIRED glfw3)
if(WIN32)
set(GLFW_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/OpenGL/Dependencies/GLFW/include")
set(GLFW_LIBRARY "${CMAKE_SOURCE_DIR}/OpenGL/Dependencies/GLFW/lib-vc2022/glfw3.lib")
else()
find_package(PkgConfig REQUIRED)
pkg_check_modules(GLFW REQUIRED glfw3)
endif()

## OpenAL
find_package(OpenAL REQUIRED)
Expand All @@ -25,23 +30,23 @@ add_executable(${PROJECT_NAME} ${cpp_files} ${header_files})

target_include_directories(${PROJECT_NAME} PRIVATE
${OPENAL_INCLUDE_DIR}
${GLFW_INCLUDE_DIRS}
${GLFW_INCLUDE_DIR}
${GLEW_INCLUDE_DIR}
${OPENGL_INCLUDE_DIRS}
Dependencies/OpenAL/include
)

if(WIN32)
target_link_libraries(${PROJECT_NAME}
-L${GLFW_LIBDIR} ${GLFW_LIBRARIES}
${GLFW_LIBRARY}
${GLEW_LIBRARY}
${OPENGL_LIBRARIES}
${OPENAL_LIBRARY}
)
target_compile_definitions(${PROJECT_NAME} PRIVATE GLEW_STATIC)
else()
target_link_libraries(${PROJECT_NAME}
-L${GLFW_LIBDIR} ${GLFW_LIBRARIES}
${GLFW_LIBRARIES}
GLEW::GLEW
${OPENGL_LIBRARIES}
${OPENAL_LIBRARY}
Expand Down

0 comments on commit 2873332

Please sign in to comment.