diff -r c445c931472f -r 4c8956a7bdf4 src/CMakeLists.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/CMakeLists.txt Sun Dec 05 17:35:23 2010 +0100 @@ -0,0 +1,170 @@ +SET(GLPK_LIB_SOURCES + glpapi01.c + glpapi02.c + glpapi03.c + glpapi04.c + glpapi05.c + glpapi06.c + glpapi07.c + glpapi08.c + glpapi09.c + glpapi10.c + glpapi11.c + glpapi12.c + glpapi13.c + glpapi14.c + glpapi15.c + glpapi16.c + glpapi17.c + glpapi18.c + glpapi19.c + glpapi.h + glpavl.c + glpavl.h + glpbfd.c + glpbfd.h + glpbfx.c + glpbfx.h + glpcpx.c + glpdmp.c + glpdmp.h + glpdmx.c + glpenv01.c + glpenv02.c + glpenv03.c + glpenv04.c + glpenv05.c + glpenv06.c + glpenv07.c + glpenv08.c + glpenv.h + glpfhv.c + glpfhv.h + glpgmp.c + glpgmp.h + glphbm.c + glphbm.h + glpini01.c + glpini02.c + glpios01.c + glpios02.c + glpios03.c + glpios04.c + glpios05.c + glpios06.c + glpios07.c + glpios08.c + glpios09.c + glpios10.c + glpios11.c + glpios12.c + glpios.h + glpipm.c + glpipm.h + glplib01.c + glplib02.c + glplib03.c + glplib.h + glplpf.c + glplpf.h + glplpx01.c + glplpx02.c + glplpx03.c + glpluf.c + glpluf.h + glplux.c + glplux.h + glpmat.c + glpmat.h + glpmpl01.c + glpmpl02.c + glpmpl03.c + glpmpl04.c + glpmpl05.c + glpmpl06.c + glpmpl.h + glpmps.c + glpnet01.c + glpnet02.c + glpnet03.c + glpnet04.c + glpnet05.c + glpnet06.c + glpnet07.c + glpnet08.c + glpnet09.c + glpnet.h + glpnpp01.c + glpnpp02.c + glpnpp03.c + glpnpp04.c + glpnpp05.c + glpnpp.h + glpqmd.c + glpqmd.h + glprgr.c + glprgr.h + glprng01.c + glprng02.c + glprng.h + glpscf.c + glpscf.h + glpscl.c + glpsdf.c + glpspm.c + glpspm.h + glpspx01.c + glpspx02.c + glpspx.h + glpsql.c + glpsql.h + glpssx01.c + glpssx02.c + glpssx.h + glpstd.h + glptsp.c + glptsp.h + amd/amd_1.c + amd/amd_2.c + amd/amd_aat.c + amd/amd_control.c + amd/amd_defaults.c + amd/amd_dump.c + amd/amd.h + amd/amd_info.c + amd/amd_internal.h + amd/amd_order.c + amd/amd_postorder.c + amd/amd_post_tree.c + amd/amd_preprocess.c + amd/amd_valid.c + colamd/colamd.c + colamd/colamd.h + ) + +IF(MSVC) + IF(CMAKE_CL_64) + SET(GLPK_LIB_SOURCES ${GLPK_LIB_SOURCES} + ${PROJECT_SOURCE_DIR}/w64/glpk_4_45.def) + ELSE() + SET(GLPK_LIB_SOURCES ${GLPK_LIB_SOURCES} + ${PROJECT_SOURCE_DIR}/w32/glpk_4_45.def) + ENDIF() +ENDIF() + +ADD_LIBRARY(glpk-shared SHARED ${GLPK_LIB_SOURCES}) +SET_TARGET_PROPERTIES(glpk-shared PROPERTIES OUTPUT_NAME glpk) +ADD_LIBRARY(glpk-static STATIC ${GLPK_LIB_SOURCES}) +SET_TARGET_PROPERTIES(glpk-static PROPERTIES OUTPUT_NAME glpk) +SET_TARGET_PROPERTIES(glpk-static PROPERTIES PREFIX "lib") + +SET_TARGET_PROPERTIES(glpk-shared PROPERTIES CLEAN_DIRECT_OUTPUT 1) +SET_TARGET_PROPERTIES(glpk-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) + + +INSTALL( + TARGETS glpk-shared glpk-static + RUNTIME DESTINATION bin COMPONENT library + ARCHIVE DESTINATION lib COMPONENT library + LIBRARY DESTINATION lib COMPONENT library +)