this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

#1017: build fix

Nesbox 20ff233b ee403932

+40 -28
+40 -28
CMakeLists.txt
··· 142 142 set(LINUX TRUE) 143 143 endif() 144 144 145 + if(LINUX) 146 + include(FindPkgConfig) 147 + if(NOT PKG_CONFIG_FOUND) 148 + message(WARNING "We need pkg-config to detect GTK libs") 149 + else() 150 + pkg_check_modules(GTK gtk+-3.0) 151 + endif() 152 + endif() 153 + 145 154 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) 146 155 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) 147 156 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) ··· 643 652 target_include_directories(wave_writer INTERFACE ${THIRDPARTY_DIR}/blip-buf) 644 653 645 654 ################################ 655 + # File dialogs 656 + ################################ 657 + 658 + add_library(file_dialogs STATIC ${CMAKE_SOURCE_DIR}/src/ext/file_dialog.c) 659 + target_include_directories(file_dialogs PRIVATE ${CMAKE_SOURCE_DIR}/include) 660 + 661 + if(LINUX) 662 + if(${GTK_FOUND}) 663 + target_include_directories(file_dialogs PRIVATE ${GTK_INCLUDE_DIRS}) 664 + target_link_libraries(file_dialogs ${GTK_LIBRARIES}) 665 + set(FILE_DIALOGS_SUPPORT ON) 666 + endif() 667 + else() 668 + set(FILE_DIALOGS_SUPPORT ON) 669 + 670 + if(APPLE) 671 + target_sources(file_dialogs PRIVATE ${CMAKE_SOURCE_DIR}/src/ext/file_dialog.m) 672 + elseif(ANDROID) 673 + target_include_directories(file_dialogs PRIVATE ${THIRDPARTY_DIR}/sdl2/include) 674 + endif() 675 + endif() 676 + 677 + if(FILE_DIALOGS_SUPPORT) 678 + target_compile_definitions(file_dialogs PUBLIC FILE_DIALOGS_SUPPORT) 679 + endif() 680 + 681 + ################################ 646 682 # TIC-80 lib 647 683 ################################ 648 684 ··· 668 704 ${TIC80LIB_DIR}/ext/gif.c 669 705 ${TIC80LIB_DIR}/ext/history.c 670 706 ${TIC80LIB_DIR}/ext/net.c 671 - ${TIC80LIB_DIR}/ext/file_dialog.c 672 707 ) 673 708 674 709 set(TIC80_OUTPUT tic80) 675 710 676 - if(LINUX) 677 - include(FindPkgConfig) 678 - if(NOT PKG_CONFIG_FOUND) 679 - message(WARNING "We need pkg-config to detect GTK libs") 680 - else() 681 - pkg_check_modules(GTK gtk+-3.0) 682 - 683 - if(${GTK_FOUND}) 684 - target_include_directories(${TIC80_OUTPUT}lib PRIVATE ${GTK_INCLUDE_DIRS}) 685 - target_link_libraries(${TIC80_OUTPUT}lib ${GTK_LIBRARIES}) 686 - endif() 687 - endif() 688 - endif() 689 - 690 - if(APPLE) 691 - set(TIC80LIB_SRC ${TIC80LIB_SRC} ${TIC80LIB_DIR}/ext/file_dialog.m) 692 - endif() 693 - 694 711 add_library(${TIC80_OUTPUT}lib STATIC ${TIC80LIB_SRC} ${DEMO_CARTS_OUT}) 695 712 696 - if(LINUX) 697 - if(${GTK_FOUND}) 698 - target_compile_definitions(${TIC80_OUTPUT}lib PUBLIC FILE_DIALOGS_SUPPORT) 699 - endif() 700 - else() 701 - target_compile_definitions(${TIC80_OUTPUT}lib PUBLIC FILE_DIALOGS_SUPPORT) 702 - endif() 703 - 704 713 if(WIN32) 705 714 target_include_directories(${TIC80_OUTPUT}lib PRIVATE ${THIRDPARTY_DIR}/dirent/include) 706 715 endif() ··· 708 717 target_include_directories(${TIC80_OUTPUT}lib PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) 709 718 710 719 target_link_libraries(${TIC80_OUTPUT}lib tic80core zip wave_writer) 720 + 721 + if(FILE_DIALOGS_SUPPORT) 722 + target_link_libraries(${TIC80_OUTPUT}lib file_dialogs) 723 + endif() 711 724 712 725 if(N3DS) 713 726 target_include_directories(${TIC80_OUTPUT}lib PRIVATE ${DEVKITPRO}/portlibs/3ds/include) ··· 907 920 target_include_directories(${TIC80_OUTPUT}-sokol PRIVATE 908 921 ${CMAKE_SOURCE_DIR}/include 909 922 ${CMAKE_SOURCE_DIR}/src 910 - ${THIRDPARTY_DIR}/sdl2/include 911 923 ${THIRDPARTY_DIR}/sokol) 912 924 913 925 if(MINGW)