Commits

Shlomi Fish committed e0f8093

Building lp_solve is working now.

Comments (0)

Files changed (1)

     "-I${CMAKE_CURRENT_SOURCE_DIR}/shared"
     "-DYY_NEVER_INTERACTIVE"
     "-DPARSER_LP"
-    "-DINVERSE_ACTIVE=INVERSSE_LUSOL"
+    "-DINVERSE_ACTIVE=INVERSE_LUSOL"
     "-DRoleIsExternalInvEngine"
 )
 
 
 SET (FREECELL_SOLVER_LIBS)
 
-ADD_LIBRARY (freecell-solver
+SET (LIBNAME "lpsolve")
+
+ADD_LIBRARY (${LIBNAME}
     SHARED
     ${LP_SOLVE_LIB_MODULES}
     )
 
-LIST (APPEND FREECELL_SOLVER_LIBS "freecell-solver")
+LIST (APPEND FREECELL_SOLVER_LIBS ${LIBNAME})
 IF (BUILD_STATIC_LIBRARY)
-    ADD_LIBRARY (freecell-solver-static
+    SET (STATICLIB "${LIBNAME}-static")
+    ADD_LIBRARY (
+        ${STATICLIB}
         STATIC
         ${LP_SOLVE_LIB_MODULES}
     )
-    LIST (APPEND FREECELL_SOLVER_LIBS "freecell-solver-static")
+    LIST (APPEND FREECELL_SOLVER_LIBS ${STATICLIB})
 
     SET_TARGET_PROPERTIES(
-        freecell-solver-static 
-        PROPERTIES OUTPUT_NAME "freecell-solver"
+        ${STATICLIB}
+        PROPERTIES OUTPUT_NAME ${LIBNAME}
     )
     SET_TARGET_PROPERTIES(
         ${FREECELL_SOLVER_LIBS}
     )
 ENDIF (BUILD_STATIC_LIBRARY)
 
-SET_TARGET_PROPERTIES(freecell-solver
+SET_TARGET_PROPERTIES(${LIBNAME}
     PROPERTIES VERSION 0.5.0 SOVERSION 0
     )
 
 IF (UNIX)
     SET(MATH_LIB "m")
+    SET(DL_LIB "dl")
 ELSE(UNIX)
     SET(MATH_LIB )
+    SET(DL_LIB )
 ENDIF(UNIX)
 
 SET(LIBTCMALLOC_LIB_LIST)
 
 FCS_ADD_EXEC(${CPACK_PACKAGE_NAME} ${LP_SOLVE_LIB_MODULES})
 
+FOREACH (TGT "${CPACK_PACKAGE_NAME}")
+    TARGET_LINK_LIBRARIES (${TGT}
+        ${MATH_LIB} ${DL_LIB} ${LIBTCMALLOC_LIB_LIST} ${LIBREDBLACK_LIB} ${LIBJUDY_LIB}
+    )
+ENDFOREACH (TGT)
+