Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1103939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:24:48+00:00 2026-05-17T01:24:48+00:00

In CMake, I can’t seem to output my library in ../out/library, only library. When

  • 0

In CMake, I can’t seem to output my library in ../out/library, only library. When I do the ../out/library path, it tells me it can’t find the library, as if it wants to link to it.

add_library(../out/JE3D ../source/CDeviceLayerSDL.cpp)

There’s more files, I’m just saving space. When I do that, I get this error.

Linking CXX static library lib../out/JE3D.a
/usr/bin/ar: lib../out/JE3D.a: No such file or directory
make[2]: * [lib../out/JE3D.a] Error 1
make[1]: *
[CMakeFiles/../out/JE3D.dir/all] Error 2
make: *** [all] Error 2

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T01:24:49+00:00Added an answer on May 17, 2026 at 1:24 am

    The LIBRARY_OUTPUT_DIRECTORY target property specifies the directory where library target files will be built.

    set_target_properties(JE3D PROPERTIES
             LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/out/library)
    

    If all the libraries are in one directory, I find it more convenient to set the CMAKE_LIBRARY_OUTPUT_DIRECTORY variable, which is used to initialize the LIBRARY_OUTPUT_DIRECTORY property when creating a target.

    set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/out/library)
    

    Edit: Check comments if your target is a static library

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two cmake-related problems: first, I can't make it to find the includes
I use CMake to build my application. How can I find where the python
With CMake I can get the Subversion revision using Subversion_WC_INFO . However, this only
When file(GLOB ...) is called, CMake applies regex to all files it can find.
I'm trying to use the cmake's function: CHECK_LIBRARY_EXISTS(library function location variable) How can I
I am sure it is a piece of cake, but I can't find it
The download page for cmake only shows a 32 bit installer for windows. Any
Question: Can CMake generate build scripts that do not, in any way, use CMake?
Can somebody please enlighten me as to what the command line flag to CMake
I've written a CMake module to find libclang: find_path(LibClang_INCLUDE_DIR clang-c/Index.h) find_library(LibClang_LIBRARY NAMES clang) But

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.