aboutsummaryrefslogtreecommitdiff
path: root/ports/ampl-mp/fix-arm-build.patch
blob: 443cdc457c8f3500feac2b9a1eb4b038e62a577c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 92089a3..d4c6762 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -257,9 +257,15 @@ if (CMAKE_CROSSCOMPILING)
     COMMAND ${CMAKE_COMMAND} -E echo
       "warning: cannot re-generate ${MP_EXPR_INFO_FILE}")
 else ()
+  if (ARITHCHK_EXEC)
+  add_custom_command(OUTPUT ${MP_EXPR_INFO_FILE}
+    COMMAND ${WINE} ${ARITHCHK_EXEC} ${MP_EXPR_INFO_FILE}
+    DEPENDS gen-expr-info)
+  else()
   add_custom_command(OUTPUT ${MP_EXPR_INFO_FILE}
     COMMAND ${WINE} $<TARGET_FILE:gen-expr-info> ${MP_EXPR_INFO_FILE}
     DEPENDS gen-expr-info)
+  endif()
 endif ()
 
 add_prefix(MP_HEADERS include/mp/
@@ -359,3 +365,4 @@ endif()
 install(DIRECTORY include/mp DESTINATION include)
 install(TARGETS mp DESTINATION lib RUNTIME DESTINATION bin)
 install(FILES LICENSE.rst DESTINATION share/mp)
+install(TARGETS gen-expr-info RUNTIME DESTINATION bin)
\ No newline at end of file
diff --git a/src/amplsig/CMakeLists.txt b/src/amplsig/CMakeLists.txt
index 81312e9..f44c847 100644
--- a/src/amplsig/CMakeLists.txt
+++ b/src/amplsig/CMakeLists.txt
@@ -14,6 +14,6 @@ find_library(WS2_32_LIBRARY Ws2_32
 PATHS ${WIN_LIBRARY_DIR} NO_DEFAULT_PATH)
 if (WS2_32_LIBRARY)
   add_ampl_library(amplsig amplsig.cc)
-  message(WS2_32_LIBRARY ${WS2_32_LIBRARY})
-  target_link_libraries(amplsig mp ${WS2_32_LIBRARY})
+  message(WS2_32_LIBRARY ws2_32)
+  target_link_libraries(amplsig mp ws2_32)
 endif ()