Advertisement
ddto

Untitled

May 12th, 2024
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CMake 1.01 KB | None | 0 0
  1. cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
  2.  
  3. project(jpdf LANGUAGES CXX)
  4.  
  5. include(FetchContent)
  6.  
  7. set(CMAKE_CXX_STANDARD 20)
  8. set(CMAKE_CXX_STANDARD_REQUIRED ON)
  9.  
  10. set(wxBUILD_SHARED OFF)
  11.  
  12. message(STATUS "Fetching wxWidgets...")
  13.  
  14. FetchContent_Declare(
  15.    wxWidgets
  16.    GIT_REPOSITORY https://github.com/wxWidgets/wxWidgets.git
  17.    GIT_SHALLOW ON
  18. )
  19. FetchContent_MakeAvailable(wxWidgets)
  20.  
  21. set(SRCS src/main.cpp)
  22.  
  23. if(APPLE)
  24.     # create bundle on apple compiles
  25.     add_executable(main MACOSX_BUNDLE ${SRCS})
  26.  
  27.     # Set a custom plist file for the app bundle - needed for Mac OS Retina display
  28.     set_target_properties(main PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
  29. else()
  30.     # the WIN32 is needed for Windows in order for it to look for WinMain
  31.     # instead of the main function. This is ignored on other systems,
  32.     # so it works on all platforms
  33.     add_executable(main WIN32 ${SRCS} main.exe.manifest)
  34. endif()
  35.  
  36. target_link_libraries(main PRIVATE wxcore wxnet)
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement