Skip to content

Commit

Permalink
ref #14 : wip windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov committed Jan 3, 2021
1 parent 78b1638 commit 93115b5
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ if (EMSCRIPTEN)
-s USE_PTHREADS=1 \
-s PTHREAD_POOL_SIZE=8 \
")
elseif(MINGW)
find_package(PkgConfig REQUIRED)
pkg_search_module(SDL2 REQUIRED sdl2)

set(OPENGL_INCLUDE_DIR "")
set(OPENGL_LIBRARIES "opengl32")
else()
find_package(OpenGL REQUIRED)
find_package(SDL2)
Expand Down Expand Up @@ -110,6 +116,11 @@ target_link_libraries(Core PRIVATE
${COREFOUNDATION_LIBRARY}
)

# todo : this is ugly, what's the proper way?
if (MINGW)
target_link_libraries(Core PRIVATE stdc++)
endif()

if (EMSCRIPTEN)
add_library(Gui STATIC
common-gui.cpp
Expand Down Expand Up @@ -207,8 +218,11 @@ if (NOT EMSCRIPTEN)
add_executable(play-full play-full.cpp)
target_link_libraries(play-full PRIVATE Core)

add_executable(record record.cpp)
target_link_libraries(record PRIVATE Core)
if (NOT MINGW)
# todo : need to find termios.h alternative for Windows
add_executable(record record.cpp)
target_link_libraries(record PRIVATE Core)
endif()

add_executable(record-full record-full.cpp)
target_link_libraries(record-full PRIVATE Core)
Expand Down

0 comments on commit 93115b5

Please sign in to comment.