Skip to content

Commit

Permalink
Added initial work on a wxWidgets-based test app.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Apr 2, 2007
1 parent 0d45ce0 commit 40ab6d2
Show file tree
Hide file tree
Showing 3 changed files with 508 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.txt
Expand Up @@ -2,6 +2,7 @@
* CHANGELOG.
*/

04022007 - Added wxWidgets-based test program (incomplete).
04012007 - Added PHYSFS_isInit() and PHYSFS_symbolicLinksPermitted() functions.
03312007 - Added a quick'n'dirty unpack utility to the extras directory. Moved
DIR archiver to start of the list, so we don't have to have every
Expand Down
23 changes: 21 additions & 2 deletions CMakeLists.txt
Expand Up @@ -297,7 +297,7 @@ IF(PHYSFS_BUILD_SHARED AND PHYSFS_BUILD_STATIC)
SET_TARGET_PROPERTIES(physfs-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
ENDIF(PHYSFS_BUILD_SHARED AND PHYSFS_BUILD_STATIC)

OPTION(PHYSFS_BUILD_TEST "Build test program." TRUE)
OPTION(PHYSFS_BUILD_TEST "Build stdio test program." TRUE)
MARK_AS_ADVANCED(PHYSFS_BUILD_TEST)
IF(PHYSFS_BUILD_TEST)
CHECK_INCLUDE_FILE(readline/readline.h HAVE_READLINE_H)
Expand All @@ -317,6 +317,24 @@ IF(PHYSFS_BUILD_TEST)
SET(PHYSFS_INSTALL_TARGETS ${PHYSFS_INSTALL_TARGETS} ";test_physfs")
ENDIF(PHYSFS_BUILD_TEST)

OPTION(PHYSFS_BUILD_WX_TEST "Build wxWidgets test program." TRUE)
MARK_AS_ADVANCED(PHYSFS_BUILD_WX_TEST)
IF(PHYSFS_BUILD_WX_TEST)
SET(wxWidgets_USE_LIBS base core adv)
SET(wxWidgets_INCLUDE_DIRS_NO_SYSTEM 1)
FIND_PACKAGE(wxWidgets)
IF(wxWidgets_FOUND)
INCLUDE(${wxWidgets_USE_FILE})
ADD_EXECUTABLE(wxtest_physfs test/wxtest_physfs.cpp)
SET_SOURCE_FILES_PROPERTIES(test/wxtest_physfs.cpp COMPILE_FLAGS ${wxWidgets_CXX_FLAGS})
TARGET_LINK_LIBRARIES(wxtest_physfs ${PHYSFS_LIB_TARGET} ${wxWidgets_LIBRARIES} ${OTHER_LDFLAGS})
SET(PHYSFS_INSTALL_TARGETS ${PHYSFS_INSTALL_TARGETS} ";wxtest_physfs")
ELSE(wxWidgets_FOUND)
MESSAGE(STATUS "wxWidgets not found. Disabling wx test app.")
SET(PHYSFS_BUILD_WX_TEST FALSE)
ENDIF(wxWidgets_FOUND)
ENDIF(PHYSFS_BUILD_WX_TEST)

INSTALL(TARGETS ${PHYSFS_INSTALL_TARGETS}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
Expand Down Expand Up @@ -352,7 +370,8 @@ MESSAGE_BOOL_OPTION("Thread safety" PHYSFS_HAVE_THREAD_SUPPORT)
MESSAGE_BOOL_OPTION("Build own zlib" PHYSFS_INTERNAL_ZLIB)
MESSAGE_BOOL_OPTION("Build static library" PHYSFS_BUILD_STATIC)
MESSAGE_BOOL_OPTION("Build shared library" PHYSFS_BUILD_SHARED)
MESSAGE_BOOL_OPTION("Build test program" PHYSFS_BUILD_TEST)
MESSAGE_BOOL_OPTION("Build wxWidgets test program" PHYSFS_BUILD_WX_TEST)
MESSAGE_BOOL_OPTION("Build stdio test program" PHYSFS_BUILD_TEST)
IF(PHYSFS_BUILD_TEST)
MESSAGE_BOOL_OPTION(" Use readline in test program" HAVE_SYSTEM_READLINE)
ENDIF(PHYSFS_BUILD_TEST)
Expand Down

0 comments on commit 40ab6d2

Please sign in to comment.