|
@@ -3,6 +3,8 @@
|
|
|
#
|
|
#
|
|
|
# Please see the file LICENSE in the source's root directory.
|
|
# Please see the file LICENSE in the source's root directory.
|
|
|
|
|
|
|
|
|
|
+CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
|
|
|
|
|
+
|
|
|
PROJECT(PhysicsFS)
|
|
PROJECT(PhysicsFS)
|
|
|
SET(PHYSFS_VERSION 1.1.2)
|
|
SET(PHYSFS_VERSION 1.1.2)
|
|
|
|
|
|
|
@@ -238,6 +240,7 @@ IF(PHYSFS_BUILD_STATIC)
|
|
|
ADD_LIBRARY(physfs-static STATIC ${PHYSFS_SRCS})
|
|
ADD_LIBRARY(physfs-static STATIC ${PHYSFS_SRCS})
|
|
|
SET_TARGET_PROPERTIES(physfs-static PROPERTIES OUTPUT_NAME "physfs")
|
|
SET_TARGET_PROPERTIES(physfs-static PROPERTIES OUTPUT_NAME "physfs")
|
|
|
SET(PHYSFS_LIB_TARGET physfs-static)
|
|
SET(PHYSFS_LIB_TARGET physfs-static)
|
|
|
|
|
+ SET(PHYSFS_INSTALL_TARGETS ${PHYSFS_INSTALL_TARGETS} ";physfs")
|
|
|
ENDIF(PHYSFS_BUILD_STATIC)
|
|
ENDIF(PHYSFS_BUILD_STATIC)
|
|
|
|
|
|
|
|
OPTION(PHYSFS_BUILD_SHARED "Build shared library" TRUE)
|
|
OPTION(PHYSFS_BUILD_SHARED "Build shared library" TRUE)
|
|
@@ -245,6 +248,7 @@ IF(PHYSFS_BUILD_SHARED)
|
|
|
ADD_LIBRARY(physfs SHARED ${PHYSFS_SRCS})
|
|
ADD_LIBRARY(physfs SHARED ${PHYSFS_SRCS})
|
|
|
TARGET_LINK_LIBRARIES(physfs ${OPTIONAL_LIBRARY_LIBS} ${OTHER_LDFLAGS})
|
|
TARGET_LINK_LIBRARIES(physfs ${OPTIONAL_LIBRARY_LIBS} ${OTHER_LDFLAGS})
|
|
|
SET(PHYSFS_LIB_TARGET physfs)
|
|
SET(PHYSFS_LIB_TARGET physfs)
|
|
|
|
|
+ SET(PHYSFS_INSTALL_TARGETS ${PHYSFS_INSTALL_TARGETS} ";physfs-static")
|
|
|
ENDIF(PHYSFS_BUILD_SHARED)
|
|
ENDIF(PHYSFS_BUILD_SHARED)
|
|
|
|
|
|
|
|
IF(NOT PHYSFS_BUILD_SHARED AND NOT PHYSFS_BUILD_STATIC)
|
|
IF(NOT PHYSFS_BUILD_SHARED AND NOT PHYSFS_BUILD_STATIC)
|
|
@@ -274,8 +278,15 @@ IF(PHYSFS_BUILD_TEST)
|
|
|
ENDIF(HAVE_READLINE_H AND HAVE_HISTORY_H)
|
|
ENDIF(HAVE_READLINE_H AND HAVE_HISTORY_H)
|
|
|
ADD_EXECUTABLE(test_physfs test/test_physfs.c)
|
|
ADD_EXECUTABLE(test_physfs test/test_physfs.c)
|
|
|
TARGET_LINK_LIBRARIES(test_physfs ${PHYSFS_LIB_TARGET} ${TEST_PHYSFS_LIBS} ${OTHER_LDFLAGS})
|
|
TARGET_LINK_LIBRARIES(test_physfs ${PHYSFS_LIB_TARGET} ${TEST_PHYSFS_LIBS} ${OTHER_LDFLAGS})
|
|
|
|
|
+ SET(PHYSFS_INSTALL_TARGETS ${PHYSFS_INSTALL_TARGETS} ";test_physfs")
|
|
|
ENDIF(PHYSFS_BUILD_TEST)
|
|
ENDIF(PHYSFS_BUILD_TEST)
|
|
|
|
|
|
|
|
|
|
+INSTALL(TARGETS ${PHYSFS_INSTALL_TARGETS}
|
|
|
|
|
+ RUNTIME DESTINATION bin
|
|
|
|
|
+ LIBRARY DESTINATION lib
|
|
|
|
|
+ ARCHIVE DESTINATION lib)
|
|
|
|
|
+INSTALL(FILES physfs.h DESTINATION include)
|
|
|
|
|
+
|
|
|
FIND_PACKAGE(Doxygen)
|
|
FIND_PACKAGE(Doxygen)
|
|
|
IF(DOXYGEN_FOUND)
|
|
IF(DOXYGEN_FOUND)
|
|
|
ADD_CUSTOM_TARGET(docs ${DOXYGEN_EXECUTABLE} COMMENT "Building documentation")
|
|
ADD_CUSTOM_TARGET(docs ${DOXYGEN_EXECUTABLE} COMMENT "Building documentation")
|