Linking externalproject() causes no rule to make libSomething.a needed by actual project. #1829
-
__PRJ_DIR = "projects/"
__OBJ_DIR = "obj/"
__BUILD_DIR = "builds/"
workspace "Amen"
configurations {"Debug", "MidRelease", "Release"}
platforms "x64"
externalproject "GLFW"
location "external/glfw/build/"
kind "StaticLib"
language "C"
project "Amen"
location(__PRJ_DIR .. "%{prj.name}/")
kind "ConsoleApp"
language "C++"
targetdir(__BUILD_DIR .. "%{cfg.shortname}/")
objdir(__OBJ_DIR .. "%{prj.name}_%{cfg.shortname}/")
files {
__PRJ_DIR .. "%{prj.name}/src/**.cpp",
__PRJ_DIR .. "%{prj.name}/src/**.hpp",
__PRJ_DIR .. "%{prj.name}/src/**.h"
}
links "GLFW" I generated the cmake project files before doing the folowing: ==== Building Amen (debug_x64) ====
make[1]: *** No rule to make target '../../external/glfw/build/bin/x64/Debug/libGLFW.a', needed by '../../builds/debug_x64/Amen'. Stop.
make: *** [Makefile:39: Amen] Error 2 This error is being caused by By the way, the static library is called Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Actually, I thought of it and now I understand that it is impossible to do. Anyway, on Linux (using makefiles), linking an external project would be impossible since Makefiles are not standard at all |
Beta Was this translation helpful? Give feedback.
Actually, I thought of it and now I understand that it is impossible to do.
Also, the documentation says that
externalproject()
only works with Visual Studio for now. But on Linux, it actually locates the Makefile and executes it, which is nice.Anyway, on Linux (using makefiles), linking an external project would be impossible since Makefiles are not standard at all
which means anyone can write it in any way he wants, thus, premake could not possibly know the build directories.