CMakeLists.txt
changeset 878 6d65c5e0049a
parent 847 5e5e6c067413
child 885 e1fe7fe85939
equal deleted inserted replaced
877:99c2fd8e689d 878:6d65c5e0049a
   295 IF(PHYSFS_BUILD_SHARED AND PHYSFS_BUILD_STATIC)
   295 IF(PHYSFS_BUILD_SHARED AND PHYSFS_BUILD_STATIC)
   296     SET_TARGET_PROPERTIES(physfs PROPERTIES CLEAN_DIRECT_OUTPUT 1)
   296     SET_TARGET_PROPERTIES(physfs PROPERTIES CLEAN_DIRECT_OUTPUT 1)
   297     SET_TARGET_PROPERTIES(physfs-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
   297     SET_TARGET_PROPERTIES(physfs-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
   298 ENDIF(PHYSFS_BUILD_SHARED AND PHYSFS_BUILD_STATIC)
   298 ENDIF(PHYSFS_BUILD_SHARED AND PHYSFS_BUILD_STATIC)
   299 
   299 
   300 OPTION(PHYSFS_BUILD_TEST "Build test program." TRUE)
   300 OPTION(PHYSFS_BUILD_TEST "Build stdio test program." TRUE)
   301 MARK_AS_ADVANCED(PHYSFS_BUILD_TEST)
   301 MARK_AS_ADVANCED(PHYSFS_BUILD_TEST)
   302 IF(PHYSFS_BUILD_TEST)
   302 IF(PHYSFS_BUILD_TEST)
   303     CHECK_INCLUDE_FILE(readline/readline.h HAVE_READLINE_H)
   303     CHECK_INCLUDE_FILE(readline/readline.h HAVE_READLINE_H)
   304     CHECK_INCLUDE_FILE(readline/history.h HAVE_HISTORY_H)
   304     CHECK_INCLUDE_FILE(readline/history.h HAVE_HISTORY_H)
   305     IF(HAVE_READLINE_H AND HAVE_HISTORY_H)
   305     IF(HAVE_READLINE_H AND HAVE_HISTORY_H)
   315     ADD_EXECUTABLE(test_physfs test/test_physfs.c)
   315     ADD_EXECUTABLE(test_physfs test/test_physfs.c)
   316     TARGET_LINK_LIBRARIES(test_physfs ${PHYSFS_LIB_TARGET} ${TEST_PHYSFS_LIBS} ${OTHER_LDFLAGS})
   316     TARGET_LINK_LIBRARIES(test_physfs ${PHYSFS_LIB_TARGET} ${TEST_PHYSFS_LIBS} ${OTHER_LDFLAGS})
   317     SET(PHYSFS_INSTALL_TARGETS ${PHYSFS_INSTALL_TARGETS} ";test_physfs")
   317     SET(PHYSFS_INSTALL_TARGETS ${PHYSFS_INSTALL_TARGETS} ";test_physfs")
   318 ENDIF(PHYSFS_BUILD_TEST)
   318 ENDIF(PHYSFS_BUILD_TEST)
   319 
   319 
       
   320 OPTION(PHYSFS_BUILD_WX_TEST "Build wxWidgets test program." TRUE)
       
   321 MARK_AS_ADVANCED(PHYSFS_BUILD_WX_TEST)
       
   322 IF(PHYSFS_BUILD_WX_TEST)
       
   323     SET(wxWidgets_USE_LIBS base core adv)
       
   324     SET(wxWidgets_INCLUDE_DIRS_NO_SYSTEM 1)
       
   325     FIND_PACKAGE(wxWidgets)
       
   326     IF(wxWidgets_FOUND)
       
   327         INCLUDE(${wxWidgets_USE_FILE})
       
   328         ADD_EXECUTABLE(wxtest_physfs test/wxtest_physfs.cpp)
       
   329         SET_SOURCE_FILES_PROPERTIES(test/wxtest_physfs.cpp COMPILE_FLAGS ${wxWidgets_CXX_FLAGS})
       
   330         TARGET_LINK_LIBRARIES(wxtest_physfs ${PHYSFS_LIB_TARGET} ${wxWidgets_LIBRARIES} ${OTHER_LDFLAGS})
       
   331         SET(PHYSFS_INSTALL_TARGETS ${PHYSFS_INSTALL_TARGETS} ";wxtest_physfs")
       
   332     ELSE(wxWidgets_FOUND)
       
   333         MESSAGE(STATUS "wxWidgets not found. Disabling wx test app.")
       
   334         SET(PHYSFS_BUILD_WX_TEST FALSE)
       
   335     ENDIF(wxWidgets_FOUND)
       
   336 ENDIF(PHYSFS_BUILD_WX_TEST)
       
   337 
   320 INSTALL(TARGETS ${PHYSFS_INSTALL_TARGETS}
   338 INSTALL(TARGETS ${PHYSFS_INSTALL_TARGETS}
   321         RUNTIME DESTINATION bin
   339         RUNTIME DESTINATION bin
   322         LIBRARY DESTINATION lib
   340         LIBRARY DESTINATION lib
   323         ARCHIVE DESTINATION lib)
   341         ARCHIVE DESTINATION lib)
   324 INSTALL(FILES physfs.h DESTINATION include)
   342 INSTALL(FILES physfs.h DESTINATION include)
   350 MESSAGE_BOOL_OPTION("CD-ROM drive support" PHYSFS_HAVE_CDROM_SUPPORT)
   368 MESSAGE_BOOL_OPTION("CD-ROM drive support" PHYSFS_HAVE_CDROM_SUPPORT)
   351 MESSAGE_BOOL_OPTION("Thread safety" PHYSFS_HAVE_THREAD_SUPPORT)
   369 MESSAGE_BOOL_OPTION("Thread safety" PHYSFS_HAVE_THREAD_SUPPORT)
   352 MESSAGE_BOOL_OPTION("Build own zlib" PHYSFS_INTERNAL_ZLIB)
   370 MESSAGE_BOOL_OPTION("Build own zlib" PHYSFS_INTERNAL_ZLIB)
   353 MESSAGE_BOOL_OPTION("Build static library" PHYSFS_BUILD_STATIC)
   371 MESSAGE_BOOL_OPTION("Build static library" PHYSFS_BUILD_STATIC)
   354 MESSAGE_BOOL_OPTION("Build shared library" PHYSFS_BUILD_SHARED)
   372 MESSAGE_BOOL_OPTION("Build shared library" PHYSFS_BUILD_SHARED)
   355 MESSAGE_BOOL_OPTION("Build test program" PHYSFS_BUILD_TEST)
   373 MESSAGE_BOOL_OPTION("Build wxWidgets test program" PHYSFS_BUILD_WX_TEST)
       
   374 MESSAGE_BOOL_OPTION("Build stdio test program" PHYSFS_BUILD_TEST)
   356 IF(PHYSFS_BUILD_TEST)
   375 IF(PHYSFS_BUILD_TEST)
   357     MESSAGE_BOOL_OPTION("  Use readline in test program" HAVE_SYSTEM_READLINE)
   376     MESSAGE_BOOL_OPTION("  Use readline in test program" HAVE_SYSTEM_READLINE)
   358 ENDIF(PHYSFS_BUILD_TEST)
   377 ENDIF(PHYSFS_BUILD_TEST)
   359 
   378 
   360 # end of CMakeLists.txt ...
   379 # end of CMakeLists.txt ...