Skip to content

Commit

Permalink
Merge pull request libfann#14 from jschueller/master
Browse files Browse the repository at this point in the history
Fix MinGW build.
  • Loading branch information
steffennissen committed Aug 16, 2014
2 parents 7f35104 + 4fcc76f commit a0099d4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ SET(CMAKE_MODULE_PATH
)

SET(VERSION 2.2.0)
option(BUILD_SHARED_LIBS "build shared/static libs" ON)

INCLUDE(DefineInstallationPaths)

Expand Down
8 changes: 4 additions & 4 deletions cmake/Modules/DefineInstallationPaths.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if (UNIX)
if (UNIX OR MINGW)
IF (NOT APPLICATION_NAME)
MESSAGE(STATUS "${PROJECT_NAME} is used as APPLICATION_NAME")
SET(APPLICATION_NAME ${PROJECT_NAME})
Expand Down Expand Up @@ -122,9 +122,9 @@ if (UNIX)
CACHE PATH "The ${APPLICATION_NAME} info install dir (default prefix/info)"
FORCE
)
endif (UNIX)
endif ()

if (WIN32)
if (MSCV)
# Same same
SET(BIN_INSTALL_DIR .)
SET(SBIN_INSTALL_DIR .)
Expand All @@ -134,5 +134,5 @@ if (WIN32)
SET(ICON_INSTALL_DIR .)
SET(SOUND_INSTALL_DIR .)
SET(LOCALE_INSTALL_DIR lang)
endif (WIN32)
endif (MSCV)

24 changes: 16 additions & 8 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ SET(floatfann_LIB_SRCS
floatfann.c
)

ADD_LIBRARY(floatfann SHARED ${floatfann_LIB_SRCS})
ADD_LIBRARY(floatfann ${floatfann_LIB_SRCS})

SET_TARGET_PROPERTIES(floatfann PROPERTIES VERSION ${VERSION} SOVERSION 2 )
INSTALL(TARGETS floatfann DESTINATION ${LIB_INSTALL_DIR} )
INSTALL(TARGETS floatfann LIBRARY DESTINATION ${LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
RUNTIME DESTINATION ${BIN_INSTALL_DIR} )


########### next target ###############
Expand All @@ -23,10 +25,12 @@ SET(doublefann_LIB_SRCS
doublefann.c
)

ADD_LIBRARY(doublefann SHARED ${doublefann_LIB_SRCS})
ADD_LIBRARY(doublefann ${doublefann_LIB_SRCS})

SET_TARGET_PROPERTIES(doublefann PROPERTIES VERSION ${VERSION} SOVERSION 2 )
INSTALL(TARGETS doublefann DESTINATION ${LIB_INSTALL_DIR} )
INSTALL(TARGETS doublefann LIBRARY DESTINATION ${LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
RUNTIME DESTINATION ${BIN_INSTALL_DIR} )


########### next target ###############
Expand All @@ -35,10 +39,12 @@ SET(fixedfann_LIB_SRCS
fixedfann.c
)

ADD_LIBRARY(fixedfann SHARED ${fixedfann_LIB_SRCS})
ADD_LIBRARY(fixedfann ${fixedfann_LIB_SRCS})

SET_TARGET_PROPERTIES(fixedfann PROPERTIES VERSION ${VERSION} SOVERSION 2 )
INSTALL(TARGETS fixedfann DESTINATION ${LIB_INSTALL_DIR} )
INSTALL(TARGETS fixedfann LIBRARY DESTINATION ${LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
RUNTIME DESTINATION ${BIN_INSTALL_DIR} )


########### next target ###############
Expand All @@ -47,8 +53,10 @@ SET(fann_LIB_SRCS
floatfann.c
)

ADD_LIBRARY(fann SHARED ${fann_LIB_SRCS})
ADD_LIBRARY(fann ${fann_LIB_SRCS})

SET_TARGET_PROPERTIES(fann PROPERTIES VERSION ${VERSION} SOVERSION 2 )
INSTALL(TARGETS fann DESTINATION ${LIB_INSTALL_DIR} )
INSTALL(TARGETS fann LIBRARY DESTINATION ${LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
RUNTIME DESTINATION ${BIN_INSTALL_DIR} )

0 comments on commit a0099d4

Please sign in to comment.