#
#    Copyright Analog Flavor 2013-2025
#
#    All rights reserved.
#
#    This software contains proprietary and confidential information which is the
#    property of Analog Flavor and is subject to license terms.
#
#    This file may be used in accordance with the license agreement 
#    provided with the software.
#
#    This copyright notice may not be removed or altered.
#

PROJECT(BSPWAVE_WX_WINDOWS_EXAMPLES)

SET(BSPWAVE_DLL_PATH ${PROJECT_SOURCE_DIR}/../../../platform/windows/32)
LINK_DIRECTORIES(${BSPWAVE_DLL_PATH})

SET (wxWidgets_ROOT_DIR D:/libraries/wxWidgets-3.0.0)
FIND_PACKAGE(wxWidgets COMPONENTS base core )
SET (wxWidgets_CONFIGURATION mswu)

IF ( wxWidgets_FOUND )

    SET (WIDGET_TEST_SRC
        ../include/wxWinBspWaveWrapper.h
        ../src/wxWinBspWaveWrapper.cpp
        ../include/bspWaveWrapper.h
        ../include/bspWaveWrapper.impl.h
        wxWinBspWaveTestApp.h
        wxWinBspWaveTestApp.cpp
        )

    INCLUDE_DIRECTORIES(../include)
    INCLUDE(${wxWidgets_USE_FILE})

    ADD_EXECUTABLE(test_bspwave_wx_win WIN32 ${WIDGET_TEST_SRC})

    SET ( LIBRARY_NAME af_bspwave_widget_win )


    SET ( REQUIRED_LIBRARIES
        ${LIBRARY_NAME}
        ${wxWidgets_LIBRARIES}
        )


    TARGET_LINK_LIBRARIES(test_bspwave_wx_win
        ${REQUIRED_LIBRARIES}
        )

    string ( REPLACE "/" "\\" WX_DLL_PATH ${wxWidgets_LIB_DIR} )

    MESSAGE(STATUS "Found BeSpice Wave at ${BSPWAVE_DLL_PATH}")
    MESSAGE(STATUS "Found wxWidgets at ${WX_DLL_PATH}")

    SET(USER_DLL_PATH "${BSPWAVE_DLL_PATH};${WX_DLL_PATH}\\" )

    MESSAGE(STATUS "Set up path for vs : ${USER_DLL_PATH}")

    CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/visual_user_template.txt ${CMAKE_CURRENT_BINARY_DIR}/test_bspwave_wx_win.vcxproj.user @ONLY)

ENDIF ( wxWidgets_FOUND )

