diff --git a/.gitignore b/.gitignore index 11756d5a..551b5d1e 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ Makefile* # QtCreator *.autosave +CMakeLists.txt.user #QtCtreator Qml *.qmlproject.user @@ -36,9 +37,6 @@ Makefile* .dew/* # PrimeWorldEditor files -bin/*.log -bin/dump/* -bin/PrimeWorldEditor.exe -bin/PrimeWorldEditor-debug.exe +bin/* +bin-debug/* build/* -externals/* \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index b8a548f9..c47d0a27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,10 +12,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Binaries) if (WIN32) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_SOURCE_DIR}/bin-debug) endif() add_subdirectory(src/Core) diff --git a/dewfile.json b/dewfile.json index 9802dfef..f6aa5cc1 100644 --- a/dewfile.json +++ b/dewfile.json @@ -26,7 +26,7 @@ "url": "https://github.com/AxioDL/nod", "type": "git", "head": "master", - "ref": "01237372e17e4470e002efbe100c81ed804eeea3" + "ref": "4dd0375cae9557a1881d56f722e20557075a9d93" }, { "name": "CodeGen", diff --git a/src/Core/CMakeLists.txt b/src/Core/CMakeLists.txt index 059fb8e5..cdf50b97 100644 --- a/src/Core/CMakeLists.txt +++ b/src/Core/CMakeLists.txt @@ -32,12 +32,6 @@ target_include_directories(pwe_core OpenGL ) -target_link_directories( - pwe_core - PRIVATE - ${ASSIMP_LIBRARY_DIRS} -) - target_link_libraries( pwe_core libcommon::libcommon @@ -46,8 +40,8 @@ target_link_libraries( lzokay::lzokay OpenGL::GL codegen::codegen - "${ZLIB_LIBRARY}" - ${ASSIMP_LIBRARIES} + assimp::assimp + ${ZLIB_LIBRARY} ) target_compile_definitions( diff --git a/src/Editor/CMakeLists.txt b/src/Editor/CMakeLists.txt index 5116290b..bf72fc72 100644 --- a/src/Editor/CMakeLists.txt +++ b/src/Editor/CMakeLists.txt @@ -59,7 +59,7 @@ find_package(Qt5 COMPONENTS Core Widgets ${QT_PLATFORM_COMPONENTS} REQUIRED) find_package(assimp CONFIG REQUIRED) # AssImp's cmake config is pretty awful. It doesn't include necesary libraries. Hopefully this can be fixed later. -find_library(IIRXML_LIBRARY IrrXMLd IrrXML) +find_library(IIRXML_LIBRARY NAMES IrrXMLd IrrXML) file(GLOB_RECURSE source_files "*.cpp" @@ -69,21 +69,16 @@ file(GLOB_RECURSE source_files add_executable(pwe_editor ${source_files}) -target_compile_features(pwe_editor PRIVATE cxx_std_17) +set_target_properties(pwe_editor PROPERTIES OUTPUT_NAME PrimeWorldEditor DEBUG_POSTFIX -debug) -target_link_directories( - pwe_editor - PRIVATE - ${ASSIMP_LIBRARY_DIRS} -) +target_compile_features(pwe_editor PRIVATE cxx_std_17) target_link_libraries( pwe_editor pwe_core Qt5::Widgets ${QT_PLATFORM_COMPONENTS_LIBS} - ${ASSIMP_LIBRARIES} - "${IIRXML_LIBRARY}" + ${IIRXML_LIBRARY} ) # TODO: These should be drive by CI if CI ever becomes a thing for PWE. @@ -108,7 +103,8 @@ if (WIN32) endif() # run windeployqt to gather necessary .dlls - add_custom_command(TARGET pwe_editor POST_BUILD COMMAND ${WINDEPLOYQT_PROGRAM} ARGS $) + add_custom_command(TARGET pwe_editor POST_BUILD COMMAND ${WINDEPLOYQT_PROGRAM} ARGS + --no-angle --no-opengl-sw $) # copy bin directory of dew prefix add_custom_command(TARGET pwe_editor POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_directory