Skip to content

Commit 54d0b64

Browse files
committed
Hacks to get compiling with mingw on Windows
1 parent 6251261 commit 54d0b64

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

CMakeLists.txt

+5-2
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,17 @@ if(MINGW OR CYGWIN)
150150
endif()
151151

152152
include_directories(include)
153+
include_directories(c:/programming/sfml-2.3/include)
153154

154155
if(NOT MULTITHREAD_SUPPORT_ENABLED)
155156
add_definitions(-DCHAISCRIPT_NO_THREADS -DCHAISCRIPT_NO_THREADS_WARNING)
156157
endif()
157158

158159
if(CMAKE_HOST_UNIX)
159160
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
160-
list(APPEND LIBS "dl")
161+
if (NOT MINGW AND NOT CYGWIN)
162+
list(APPEND LIBS "dl")
163+
endif()
161164
endif()
162165

163166
if(MULTITHREAD_SUPPORT_ENABLED)
@@ -182,7 +185,7 @@ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${LINKER_FLAGS}")
182185
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${LINKER_FLAGS}")
183186

184187
add_executable(game_engine main.cpp game.cpp game_event.cpp map.cpp chaiscript_stdlib.cpp chaiscript_bindings.cpp chaiscript_creator.cpp)
185-
target_link_libraries(game_engine ${SFML_GRAPHICS} ${SFML_WINDOW} ${SFML_SYSTEM} dl)
188+
target_link_libraries(game_engine ${SFML_GRAPHICS} ${SFML_WINDOW} ${SFML_SYSTEM} ${LIBS})
186189
file(COPY resources DESTINATION ${CMAKE_BINARY_DIR})
187190
file(COPY main.chai DESTINATION ${CMAKE_BINARY_DIR})
188191

0 commit comments

Comments
 (0)