##--------------------------------------------------------------------------- ## $RCSfile: CMakeLists.txt $ ## $Source: CMakeLists.txt $ ## $Revision: 1.48 $ ## $Date: Feb 26, 2006 10:39:43 PM $ ##--------------------------------------------------------------------------- ## Author: Jorgen Bodde ## Copyright: (c) Jorgen Bodde ## License: wxWidgets License ##--------------------------------------------------------------------------- ##--------------------------------------------------- ## Please set your wxWidgets configuration here ##--------------------------------------------------- SET(CMAKE_FIND_LIBRARY_PREFIXES "") SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib") # Here you can define what libraries of wxWidgets you need for your # application. You can figure out what libraries you need here; # http://www.wxwidgets.org/manuals/2.8/wx_librarieslist.html SET(wxWidgets_USE_LIBS base core gl net adv) # We need the Find package for wxWidgets to work FIND_PACKAGE(wxWidgets) ##--------------------------------------------------- ## Actual config file starts here ##--------------------------------------------------- # Did we find wxWidgets ? This condition will fail # for as long as the internal vars do not point to # the proper wxWidgets configuration IF(wxWidgets_FOUND) # Include wxWidgets macros INCLUDE(${wxWidgets_USE_FILE}) # Our project is called 'minimal' this is how it will be called in # visual studio, and in our makefiles. PROJECT( minimal ) # We define the include paths here, our minimal source dir is one, # and also the include dirs defined by wxWidgets INCLUDE_DIRECTORIES(${minimal_SOURCE_DIR} ${wxWidgets_INCLUDE_DIRS} ) # For convenience we define the sources as a variable. You can add # header files and cpp / c files and CMake will sort them out SET(SRCS main.cpp ) # If we build for windows systems, we also include the resource file # containing the manifest, icon and other resources IF(WIN32) SET(SRCS ${SRCS} minimal.rc) ENDIF(WIN32) # Here we define the executable minimal.exe or minimal on other systems # the above paths and defines will be used in this build ADD_EXECUTABLE(wx2 WIN32 ${SRCS}) # We add to our target 'minimal' the wxWidgets libraries. These are # set for us by the find script. If you need other libraries, you # can add them here as well. TARGET_LINK_LIBRARIES(wx2 ${wxWidgets_LIBRARIES} ) ELSE(wxWidgets_FOUND) # For convenience. When we cannot continue, inform the user MESSAGE("wxWidgets not found!") ENDIF(wxWidgets_FOUND)